lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-9269) Ability to create/delete/list snapshots for a solr core
Date Thu, 21 Jul 2016 17:19:20 GMT

    [ https://issues.apache.org/jira/browse/SOLR-9269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15388066#comment-15388066
] 

ASF GitHub Bot commented on SOLR-9269:
--------------------------------------

Github user hgadre commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/52#discussion_r71747583
  
    --- Diff: solr/core/src/java/org/apache/solr/handler/admin/CoreAdminOperation.java ---
    @@ -919,7 +928,93 @@ public void call(CallInfo callInfo) throws Exception {
             }
           }
         }
    +  },
    +  CREATESNAPSHOT_OP(CREATESNAPSHOT) {
    +    @Override
    +    public void call(CallInfo callInfo) throws Exception {
    +      CoreContainer cc = callInfo.handler.getCoreContainer();
    +      final SolrParams params = callInfo.req.getParams();
    +
    +      String commitName = params.required().get(CoreAdminParams.COMMIT_NAME);
    +      String cname = params.required().get(CoreAdminParams.CORE);
    +      try (SolrCore core = cc.getCore(cname)) {
    +        if (core == null) {
    +          throw new SolrException(ErrorCode.SERVER_ERROR, "Unable to locate core " +
cname);
    +        }
    +        if (core.getDeletionPolicy().getLatestCommit() == null) {
    --- End diff --
    
    I see that ReplicationHandler is implemented differently. If the latestCommit is null,
it uses the commit opened by the index searcher. Now I am using the same logic here, assuming
the index searcher will always return non-null index commit. 


> Ability to create/delete/list snapshots for a solr core
> -------------------------------------------------------
>
>                 Key: SOLR-9269
>                 URL: https://issues.apache.org/jira/browse/SOLR-9269
>             Project: Solr
>          Issue Type: Sub-task
>          Components: SolrCloud
>            Reporter: Hrishikesh Gadre
>            Assignee: David Smiley
>         Attachments: SOLR-9269.patch
>
>
> Support snapshot create/delete/list functionality @ the Solr core level. Please refer
to parent JIRA for more details.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message