9aman commented on code in PR #20223:
URL: https://github.com/apache/pinot/pull/20223#discussion_r4547188671
##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/RealtimeSegmentDataManager.java:
##########
@@ -2278,6 +2278,12 @@ private void setConsumeEndTime(SegmentZKMetadata
segmentZKMetadata, long now) {
long maxConsumeTimeMillis = _streamConfig.getFlushThresholdTimeMillis();
_consumeEndTime = segmentZKMetadata.getCreationTime() +
maxConsumeTimeMillis;
+ // For pauseless tables, keep the end time from ZK while it is in the
future so that all replicas stop together.
+ // A replica that consumes past the end offset fixed at commit start can
only download the committed segment.
+ if (_consumeEndTime > now &&
PauselessConsumptionUtils.isPauselessEnabled(_tableConfig)) {
Review Comment:
This only applies when no replica is consuming at the end time (replication
1, or every replica restarts just before it and waits to start). Otherwise a
healthy replica commits at the end time and the ONLINE transition stops the
late one. Pauseless tables run with replication ≥ 2, so we accept this 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]