HDDS-16098. Speed up TestStreamRead - #10961
Open
adoroszlai wants to merge 1 commit into
Open
Conversation
yandrey321
reviewed
Aug 6, 2026
| final File blockFile = ContainerLayoutVersion.FILE_PER_BLOCK.getChunkFile(containerData, blockId, null); | ||
| assertTrue(blockFile.exists()); | ||
| assertEquals(BLOCK_SIZE, blockFile.length()); | ||
| final String expectedMd5 = generateMd5(keySize, SizeInBytes.ONE_MB, blockFile); |
Contributor
There was a problem hiding this comment.
md5 is slow, we can use CRC32 for a checksum it should improve test performance even further
Contributor
Author
There was a problem hiding this comment.
I get the following error:
NoSuchAlgorithmException: CRC32 MessageDigest not available
I also tried SHA-256, but it's even slower.
BTW, this is out of scope here. MD5 is used many places, so if there is room for improvement, it should be applied globally.
rich7420
approved these changes
Aug 8, 2026
rich7420
left a comment
Contributor
There was a problem hiding this comment.
thanks for the patch @adoroszlai !
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Speed up
TestStreamRead: bytes per checksum setting only affects client, the test cases can share the cluster.https://issues.apache.org/jira/browse/HDDS-16098
How was this patch tested?
Before (local):
After (local):
Before (CI):
After (CI):