KKcorps commented on code in PR #10251:
URL: https://github.com/apache/pinot/pull/10251#discussion_r1100984339
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/BasePartitionUpsertMetadataManager.java:
##########
@@ -305,10 +382,48 @@ protected void handleOutOfOrderEvent(Object
currentComparisonValue, Object recor
}
}
+ protected void startOperation() {
+ _numPendingOperations.getAndIncrement();
+ }
+
+ protected void finishOperation() {
+ if (_numPendingOperations.decrementAndGet() == 0) {
+ synchronized (_numPendingOperations) {
+ _numPendingOperations.notifyAll();
+ }
+ }
+ }
+
+ @Override
+ public void stop() {
+ _stopped = true;
+ int numPendingOperations = _numPendingOperations.decrementAndGet();
Review Comment:
It should be just `_numPendingOperations.get()` right? No need to decrement
here.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]