ijioio commented on a change in pull request #595:
URL: https://github.com/apache/solr/pull/595#discussion_r801550139



##########
File path: 
solr/core/src/java/org/apache/solr/cloud/api/collections/BackupCmd.java
##########
@@ -138,6 +138,15 @@ public void call(ClusterState state, ZkNodeProps message, 
NamedList<Object> resu
 
       backupMgr.writeBackupProperties(backupProperties);
 
+      // It can't be done within aggregateResults call
+      // since endTime is filled later
+      if(backupProperties != null) {

Review comment:
       Hi @cpoerschke Thanks for the note! It can be `null`, in case of non 
incremental call it will be redirected to `copyIndexFiles(URI, String, 
ZkNodeProps, NamedList<Object>)`:
   
   ```java
     public void call(ClusterState state, ZkNodeProps message, 
NamedList<Object> results) throws Exception {
       ...
       try (BackupRepository repository = cc.newBackupRepository(repo)) {
         ...
         if (incremental) {
             incrementalCopyIndexFiles(backupUri, collectionName, message, 
results, backupProperties, backupMgr);
         } else {
             copyIndexFiles(backupUri, collectionName, message, results);
         }
         ...
       }
       ...
     }
   ```
   
   and within `copyIndexFiles` it will call `aggregateResults` without 
providing `backupManager` and `backupProps`:
   
   ```java
     private void copyIndexFiles(URI backupPath, String collectionName, 
ZkNodeProps request, NamedList<Object> results) throws Exception {
       ...
       NamedList<Object> aggRsp = aggregateResults(results, collectionName, 
slices, null, null);
       ...
     }
   ```
   
   Maybe we should investigate this is it safe to provide `copyIndexFiles` with 
`backupManager` and `backupProps`?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to