adoroszlai opened a new pull request #3116: URL: https://github.com/apache/ozone/pull/3116
## What changes were proposed in this pull request? `MultipartCryptoKeyInputStream` may need to adjust read position and/or length to make sure it reads enough data to fill the crypto buffer. Position adjustment means read starts at a location before the actual requested position. Length adjustment means more data is read at the end. Extra data is discarded in both cases. This PR fixes a bug in length adjustment: the position of the underlying stream was left at the position after the discarded part, this is where the next read started. Thus this part was missing from the final data at the client side. The bug can be reproduced with MPU parts that are not whole multiples of the crypto buffer size, which defaults to 8KB. Hence test case is added where the first part has 1KB more, to trigger length adjustment in the second part. The PR also adds the KMS configs necessary to test S3 Gateway with encrypted bucket, and runs all S3 tests with encrypted bucket, too (in non-HA case for now). https://issues.apache.org/jira/browse/HDDS-6349 ## How was this patch tested? Added Robot test to reproduce the problem: https://github.com/adoroszlai/hadoop-ozone/runs/5263846303#step:5:528 And verified the fix: https://github.com/adoroszlai/hadoop-ozone/runs/5265040205#step:5:524 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
