linkedin / ambry

Distributed object store
https://github.com/linkedin/ambry/wiki
Apache License 2.0
1.75k stars 276 forks source link

Use concurrent hashmap for headers in netty request #2911

Closed justinlin-linkedin closed 1 month ago

justinlin-linkedin commented 1 month ago

Summary

We are not ordering the headers and query parameters in netty request, just use HashMap, not TreeMap. And since we are now modifying the map from multiple threads due to 100-continue, we should use concurrenthashmap.

Test

Unit test

codecov-commenter commented 1 month ago

Codecov Report

Attention: Patch coverage is 22.22222% with 7 lines in your changes missing coverage. Please review.

Project coverage is 70.10%. Comparing base (52ba813) to head (9064b07). Report is 112 commits behind head on master.

Files with missing lines Patch % Lines
.../frontend/s3/S3MultipartCompleteUploadHandler.java 0.00% 1 Missing and 1 partial :warning:
...mbry/frontend/s3/S3MultipartUploadPartHandler.java 0.00% 1 Missing and 1 partial :warning:
...ava/com/github/ambry/frontend/s3/S3PutHandler.java 0.00% 1 Missing and 1 partial :warning:
.../main/java/com/github/ambry/rest/NettyRequest.java 66.66% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2911 +/- ## ============================================ + Coverage 64.24% 70.10% +5.85% - Complexity 10398 11908 +1510 ============================================ Files 840 863 +23 Lines 71755 73375 +1620 Branches 8611 8838 +227 ============================================ + Hits 46099 51438 +5339 + Misses 23004 19236 -3768 - Partials 2652 2701 +49 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.