-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BugFix] Fix Header casing of DocumentServiceResponse to be case insensitve header comparison #350
base: master
Are you sure you want to change the base?
Conversation
commons/src/main/java/com/microsoft/azure/cosmosdb/rx/internal/RxDocumentServiceResponse.java
Show resolved
Hide resolved
commons/src/main/java/com/microsoft/azure/cosmosdb/rx/internal/RxDocumentServiceResponse.java
Outdated
Show resolved
Hide resolved
@moderakh are there any other headers implementations inside which needs attenton? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is ~5% perf impact associated to this PR:
1000
master:
2020-08-10 18:43:08,459 [main] INFO com.microsoft.azure.cosmosdb.benchmark.AsyncReadBenchmark - [2000000] operations performed in [138] seconds.
2020-08-10 18:48:45,388 [main] INFO com.microsoft.azure.cosmosdb.benchmark.AsyncReadBenchmark - [2000000] operations performed in [137] seconds.
2020-08-10 18:55:45,355 [main] INFO com.microsoft.azure.cosmosdb.benchmark.AsyncReadBenchmark - [2000000] operations performed in [143] seconds.
2020-08-10 19:03:45,723 [main] INFO com.microsoft.azure.cosmosdb.benchmark.AsyncReadBenchmark - [2000000] operations performed in [140] seconds.
2020-08-10 19:16:37,263 [main] INFO com.microsoft.azure.cosmosdb.benchmark.AsyncReadBenchmark - [2000000] operations performed in [137] seconds.
2020-08-10 19:23:03,312 [main] INFO com.microsoft.azure.cosmosdb.benchmark.AsyncReadBenchmark - [2000000] operations performed in [141] seconds.
2020-08-10 19:29:33,274 [main] INFO com.microsoft.azure.cosmosdb.benchmark.AsyncReadBenchmark - [2000000] operations performed in [135] seconds.
2020-08-10 19:34:57,802 [main] INFO com.microsoft.azure.cosmosdb.benchmark.AsyncReadBenchmark - [2000000] operations performed in [134] seconds.
2020-08-10 19:37:34,646 [main] INFO com.microsoft.azure.cosmosdb.benchmark.AsyncReadBenchmark - [2000000] operations performed in [136] seconds.
(138 + 137 + 143 + 140 + 137 + 141 + 135 + 134 + 136) throwing out the worst one 143
(138 + 137 + 140 + 137 + 141 + 135 + 134 + 136) / 8 = 137
this PR:
2020-08-10 18:37:43,643 [main] INFO com.microsoft.azure.cosmosdb.benchmark.AsyncReadBenchmark - [2000000] operations performed in [143] seconds.
2020-08-10 18:46:05,978 [main] INFO com.microsoft.azure.cosmosdb.benchmark.AsyncReadBenchmark - [2000000] operations performed in [143] seconds
2020-08-10 18:51:53,919 [main] INFO com.microsoft.azure.cosmosdb.benchmark.AsyncReadBenchmark - [2000000] operations performed in [142] seconds
2020-08-10 18:58:46,597 [main] INFO com.microsoft.azure.cosmosdb.benchmark.AsyncReadBenchmark - [2000000] operations performed in [142] seconds.
2020-08-10 19:09:56,838 [main] INFO com.microsoft.azure.cosmosdb.benchmark.AsyncReadBenchmark - [2000000] operations performed in [147] seconds.
2020-08-10 19:19:55,376 [main] INFO com.microsoft.azure.cosmosdb.benchmark.AsyncReadBenchmark - [2000000] operations performed in [148] seconds.
2020-08-10 19:26:18,030 [main] INFO com.microsoft.azure.cosmosdb.benchmark.AsyncReadBenchmark - [2000000] operations performed in [143] seconds.
2020-08-10 19:40:50,892 [main] INFO com.microsoft.azure.cosmosdb.benchmark.AsyncReadBenchmark - [2000000] operations performed in [141] seconds
2020-08-10 19:44:06,982 [main] INFO com.microsoft.azure.cosmosdb.benchmark.AsyncReadBenchmark - [2000000] operations performed in [143] seconds.
(143 + 143 + 142 + 142 + 147 + 148 + 143 + 141 + 143) throwing out the worst one 148
(143 + 143 + 142 + 142 + 147 + 143 + 141 + 143) /8 = 143
perf impact
(143 - 137)/ 137 ~ 5%
Http Headers are by default case insensitive. Fix DocumentServiceResponse so that the headers coming out of it are case insensitive.