deepthi912 commented on code in PR #20106:
URL: https://github.com/apache/pinot/pull/20106#discussion_r4446093097
##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/ConsumerCoordinator.java:
##########
@@ -116,14 +121,65 @@ public void acquire(LLCSegmentName llcSegmentName)
}
}
+ /// Waits for required history before acquiring the consumer permit. Local
permit releases wake all waiters;
+ /// Helix assignment and state changes still use the periodic check.
Readiness can perform ZooKeeper reads, so it
+ /// must run outside the monitor. The version prevents losing a release
between the readiness check and the wait.
+ /// @return whether readiness passed, or false if consumption was stopped
+ boolean waitUntilReadyToConsume(int partitionGroupId, BooleanSupplier
isReadyToConsume, BooleanSupplier shouldStop)
Review Comment:
With `enforceConsumptionInOrder` on, dedup/partial-upsert consumers now run
two previous-segment checks back to back: this one, then
`waitForPreviousSegment()` in `acquire()`. This one is stricter, so the second
adds nothing.
Can we move this check into `waitForPreviousSegment()` for these tables, so
there's one check and one wait loop?
--
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]