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

    https://github.com/apache/lucene-solr/pull/52#discussion_r71723294
  
    --- Diff: 
solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java ---
    @@ -512,11 +513,24 @@ private void doSnapShoot(SolrParams params, 
SolrQueryResponse rsp,
             numberToKeep = Integer.MAX_VALUE;
           }
     
    -      IndexDeletionPolicyWrapper delPolicy = core.getDeletionPolicy();
    -      IndexCommit indexCommit = delPolicy.getLatestCommit();
    +      IndexCommit indexCommit = null;
    +      String commitName = params.get(CoreAdminParams.COMMIT_NAME);
    +      if (commitName != null) {
    +        SolrSnapshotMetaDataManager snapshotMgr = 
core.getSnapshotMetaDataManager();
    +        Optional<IndexCommit> commit = 
snapshotMgr.getIndexCommitByName(commitName);
    +        if(commit.isPresent()) {
    +          indexCommit = commit.get();
    +        } else {
    +          throw new SolrException(ErrorCode.SERVER_ERROR, "Unable to find 
an index commit with name " + commitName +
    --- End diff --
    
    I think this should be a BAD_REQUEST


---
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