mbwaheed commented on a change in pull request #1055: SOLR-13932 Review 
directory locking and Blob interactions
URL: https://github.com/apache/lucene-solr/pull/1055#discussion_r356424718
 
 

 ##########
 File path: 
solr/core/src/java/org/apache/solr/store/blob/metadata/SharedStoreResolutionUtil.java
 ##########
 @@ -147,42 +139,53 @@ public static SharedMetadataResolutionResult 
resolveMetadata(ServerSideMetadata
     
     if (local == null) {
       // The shard index data does not exist locally. All we can do is pull.  
-      // We've computed blobFilesMissingLocally and localFilesMissingOnBlob is 
empty as it should be.
+      // We've computed blobFilesMissingLocally. localFilesMissingOnBlob is 
empty as it should be.
       return new 
SharedMetadataResolutionResult(localFilesMissingOnBlob.values(), 
blobFilesMissingLocally.values(), blobFilesMissingLocally.values(), false);
     }
 
-    boolean localConflictingWithBlob = false;
+    // If trying to pull files from Blob, make sure similarly named files do 
not already exist outside the current commit point
+    ImmutableSet<String> allLocalFiles = local.getAllFiles();
+
+    boolean downloadToNewDir = false;
     // Verify there are no inconsistencies between local index and blob index 
files
     for (BlobFile bf : distant.getBlobFiles()) {
+      final String solrFilename = bf.getSolrFileName();
       // We remove from map of local files those already present remotely 
since they don't have to be pushed.
-      localFilesMissingOnBlob.remove(bf.getSolrFileName());
-      CoreFileData cf = allLocalFiles.get(bf.getSolrFileName());
-      if (cf != null) {
+      CoreFileData localFile = localFilesMissingOnBlob.remove(solrFilename);
+      if (localFile != null) {
         // The blob file is present locally. Check if there is a conflict 
between local and distant (blob) versions of that file.
 
 Review comment:
   The blob file is present locally. --> The blob file is present locally and 
is part of current commit point.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to