You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2022/02/08 11:52:21 UTC

[GitHub] [solr] ijioio commented on a change in pull request #595: SOLR-15982: Add end time value to backup response

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 and it is 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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org