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#9924)

(cherry picked from commit 967ef31)

Signed-off-by: bansvaru <[email protected]>
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 311e3de commit 6729882
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 6729882

Please sign in to comment.