loquisgon commented on a change in pull request #11123:
URL: https://github.com/apache/druid/pull/11123#discussion_r626019627



##########
File path: 
server/src/main/java/org/apache/druid/segment/realtime/appenderator/AppenderatorImpl.java
##########
@@ -558,35 +570,44 @@ public void clear() throws InterruptedException
     final List<Pair<FireHydrant, SegmentIdWithShardSpec>> indexesToPersist = 
new ArrayList<>();
     int numPersistedRows = 0;
     long bytesPersisted = 0L;
+    AtomicLong totalHydrantsCount = new AtomicLong();

Review comment:
       I forgot about `SettableSupplier`, I could use this rather than 
`AtomicLong` since there is no multiple thread access to that variable. But I 
think that because it is a counter using the built in add in `AtomicLong` is 
convenient in this case.




-- 
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to