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. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to