bruno-roustant commented on code in PR #3185: URL: https://github.com/apache/solr/pull/3185#discussion_r1957163042
########## solr/core/src/java/org/apache/solr/handler/IncrementalShardBackup.java: ########## @@ -145,21 +145,22 @@ protected IncrementalShardSnapshotResponse backup(final IndexCommit indexCommit) details.startTime = Instant.now().toString(); Collection<String> files = indexCommit.getFileNames(); + DirectoryFactory directoryFactory = solrCore.getDirectoryFactory(); Directory dir = - solrCore - .getDirectoryFactory() - .get( - solrCore.getIndexDir(), - DirectoryFactory.DirContext.DEFAULT, - solrCore.getSolrConfig().indexConfig.lockType); + directoryFactory.get( + solrCore.getIndexDir(), + DirectoryFactory.DirContext.DEFAULT, Review Comment: In theversion 2 of the PR, I separated the DirContext (what the directory is) and DirUseContext (what the directory will be used for). I put replication and backup in DirUseContext, so they cannot be passed to DirectoryFactory.get(). ########## solr/core/src/java/org/apache/solr/handler/IncrementalShardBackup.java: ########## @@ -145,21 +145,22 @@ protected IncrementalShardSnapshotResponse backup(final IndexCommit indexCommit) details.startTime = Instant.now().toString(); Collection<String> files = indexCommit.getFileNames(); + DirectoryFactory directoryFactory = solrCore.getDirectoryFactory(); Directory dir = - solrCore - .getDirectoryFactory() - .get( - solrCore.getIndexDir(), - DirectoryFactory.DirContext.DEFAULT, - solrCore.getSolrConfig().indexConfig.lockType); + directoryFactory.get( + solrCore.getIndexDir(), + DirectoryFactory.DirContext.DEFAULT, Review Comment: In the version 2 of the PR, I separated the DirContext (what the directory is) and DirUseContext (what the directory will be used for). I put replication and backup in DirUseContext, so they cannot be passed to DirectoryFactory.get(). -- 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-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org