sajjad-moradi commented on a change in pull request #7267:
URL: https://github.com/apache/pinot/pull/7267#discussion_r707788154
##########
File path:
pinot-common/src/main/java/org/apache/pinot/common/utils/ServiceStatus.java
##########
@@ -236,13 +242,24 @@ public synchronized Status getServiceStatus() {
return _serviceStatus;
}
long now = System.currentTimeMillis();
- if (now < _endWaitTime) {
- _statusDescription =
- String.format("Waiting for consuming segments to catchup,
timeRemaining=%dms", _endWaitTime - now);
- return Status.STARTING;
+ if (now >= _endWaitTime) {
+ _statusDescription = String.format("Consuming segments status GOOD
since %dms", _endWaitTime);
+ return Status.GOOD;
}
- _statusDescription = String.format("Consuming segments status GOOD since
%dms", _endWaitTime);
- return Status.GOOD;
+ if (_consumptionNotYetCaughtUp &&
_allConsumingSegmentsHaveReachedLatestOffset.get()) {
+ // TODO: Once the performance of offset based consumption checker is
validated:
+ // - remove the log line
+ // - uncomment the status & statusDescription lines
+ // - remove boolean flag _consumptionNotYetCaughtUp
+ _consumptionNotYetCaughtUp = false;
+ LOGGER.info("All consuming segments have reached their latest offsets!
"
+ + "Finished {} msec earlier than time threshold.", _endWaitTime -
now);
+// _statusDescription = "Consuming segments status GOOD as all consuming
segments have reached the latest offset";
+// return Status.GOOD;
+ }
+ _statusDescription =
+ String.format("Waiting for consuming segments to catchup,
timeRemaining=%dms", _endWaitTime - now);
Review comment:
Added the number of segments yet to catch up.
--
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]