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) (opensearch-project#9923)

(cherry picked from commit 967ef31)

Signed-off-by: bansvaru <bansvaru@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 5258ff2 commit e47a94a
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 e47a94a

Please sign in to comment.