Skip to content

Commit

Permalink
Disable remote integrity check for encrypted repos for ChecksumBlobst…
Browse files Browse the repository at this point in the history
…oreFormat (opensearch-project#9908)

Signed-off-by: bansvaru <bansvaru@amazon.com>
  • Loading branch information
linuxpi committed Sep 8, 2023
1 parent c99ba63 commit 967ef31
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public void writeAsync(
WritePriority.HIGH,
(size, position) -> new OffsetRangeIndexInputStream(input, size, position),
expectedChecksum,
true
((AsyncMultiStreamBlobContainer) blobContainer).remoteIntegrityCheckSupported()
)
) {
((AsyncMultiStreamBlobContainer) blobContainer).asyncBlobUpload(remoteTransferContainer.createWriteContext(), listener);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,11 @@ public void testWriteFullMetadataInParallelSuccess() throws IOException {
assertEquals(writtenIndexMetadata.getIndex().getName(), "test-index");
assertEquals(writtenIndexMetadata.getIndex().getUUID(), "index-uuid");
long expectedChecksum = RemoteTransferContainer.checksumOfChecksum(new ByteArrayIndexInput("metadata-filename", writtenBytes), 8);
assertEquals(capturedWriteContext.getExpectedChecksum().longValue(), expectedChecksum);
if (capturedWriteContext.doRemoteDataIntegrityCheck()) {
assertEquals(capturedWriteContext.getExpectedChecksum().longValue(), expectedChecksum);
} else {
assertEquals(capturedWriteContext.getExpectedChecksum(), null);
}

}

Expand Down

0 comments on commit 967ef31

Please sign in to comment.