Browse Source

Stop Checking if Segment Data Blob Exists before Write (#59905)

With uuid named segment data blobs there is no reason to ensure no overwrites are happening
for these blobs when writing. On the contrary, at least on Azure this check can conflict with
the SDK's retrying and cause upload failures randomly.
Armin Braun 5 years ago
parent
commit
57719fc08c

+ 1 - 1
server/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreRepository.java

@@ -2298,7 +2298,7 @@ public abstract class BlobStoreRepository extends AbstractLifecycleComponent imp
                 final String partName = fileInfo.partName(i);
                 final String partName = fileInfo.partName(i);
                 logger.trace(() ->
                 logger.trace(() ->
                         new ParameterizedMessage("[{}] Writing [{}] to [{}]", metadata.name(), partName, shardContainer.path()));
                         new ParameterizedMessage("[{}] Writing [{}] to [{}]", metadata.name(), partName, shardContainer.path()));
-                shardContainer.writeBlob(partName, inputStream, partBytes, true);
+                shardContainer.writeBlob(partName, inputStream, partBytes, false);
             }
             }
             Store.verify(indexInput);
             Store.verify(indexInput);
             snapshotStatus.addProcessedFile(fileInfo.length());
             snapshotStatus.addProcessedFile(fileInfo.length());