deepthi912 opened a new pull request, #20421:
URL: https://github.com/apache/pinot/pull/20421
## Problem
Brokers route a newly pushed segment that no replica serves yet as *new*,
not unavailable, for `pinot.broker.new.segment.expiration.seconds`.
`SegmentStatusChecker` skips new segments only for
`controller.statuschecker.waitForPushTimePeriod` (default 10m). So a segment
that takes longer to load, for example one queued behind a server-side
throttler, drives `percentOfReplicas` to 0 and pages, while brokers still treat
it as loading.
## Change
- Each run, read `pinot.broker.new.segment.expiration.seconds` from the
cluster config, falling back to the broker default (5m), and use
`max(controller grace, broker window)`.
- A new segment is skipped within that window unless a replica is in
`ERROR`, so a failed load still alerts.
- Clusters without the key keep a 10m grace, since max(10m, 5m) = 10m.
- A value set only in a broker's own config file isn't visible to the
controller. Those clusters behave as before.
## Tests
-
`SegmentStatusCheckerTest#segmentSkippedWhileBrokersRouteItAsNewUnlessInError`
covers four cases:
- within the broker window, OFFLINE: skipped;
- within the broker window, ERROR: counted;
- past the broker window: counted;
- broker window shorter than the controller grace: no change.
- Existing tests pin the broker window to 0, so their behavior is unchanged.
- All 43 tests in `SegmentStatusCheckerTest` passed on the first revision.
After the switch to a single window, only spotless, checkstyle and license were
re-run.
## Note
Draft apache/pinot#18934 edits the `refTimeMs` lines right next to this
change, so a textual merge conflict is possible. The two changes don't conflict
in behavior.
--
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]