gianm 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_r305607832
##########
File path:
server/src/main/java/org/apache/druid/client/cache/ForegroundCachePopulator.java
##########
@@ -75,21 +80,19 @@ public ForegroundCachePopulator(
Sequences.map(
sequence,
input -> {
- if (!tooBig.get()) {
- synchronized (lock) {
Review comment:
This lock removal is the core change happening, and it looks good to me. The
lock seems to have been pointless, since the only thing worth protecting is the
`ByteArrayOutputStream`, and that's only being accessed by a single thread (the
thread that walks the Sequence).
----------------------------------------------------------------
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]