leventov commented on a change in pull request #8116: remove unnecessary lock
in ForegroundCachePopulator leading to a lot of contention
URL: https://github.com/apache/incubator-druid/pull/8116#discussion_r305571664
##########
File path:
server/src/main/java/org/apache/druid/client/cache/ForegroundCachePopulator.java
##########
@@ -36,7 +36,6 @@
{
Review comment:
Please provide [concurrent access
documentation](https://github.com/code-review-checklists/java-concurrency#justify-document)
for this class (or for `CachePopulator` in general, and make
`ForegroundCachePopulator`'s Javadoc just refer to its superclass's Javadoc),
and/or describe the [concurrent control or data
flow](https://github.com/code-review-checklists/java-concurrency#threading-flow-model).
In particular, this passage from the PR description:
> since CachePopulator is shared by all processing threads but the lock
covers bytes and json generator that are tied to a specific segment which
should only be happening in a single thread.
is not obvious, but it's not reflected anywhere in the code itself.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]