Jackie-Jiang opened a new pull request, #19354:
URL: https://github.com/apache/pinot/pull/19354

   ## Summary
   
   Follow-up to #19292. 
`PauselessRealtimeIngestionIntegrationTest.testCommitEndMetadataFailure` 
[failed on 
CI](https://github.com/apache/pinot/actions/runs/32532078722/job/96925969353) 
with "Some segments still have missing url" even with #19292 in place, because 
the test still races Helix convergence:
   
   - When commit-start succeeds, the stranded segment is already ONLINE in the 
ideal state, but the server still has to process the `CONSUMING -> ONLINE` 
transition before the external view shows ONLINE. On a loaded CI host these 
transitions queue up — in the failing run, one segment had not converged 26 
seconds after its commit-start.
   - The repair for COMMITTING segments (`uploadToDeepStoreIfMissing`) 
discovers the hosting server through the external view via 
`PeerServerSegmentFinder`, which retries only 5 times over ~8-15s, and the 
upload is deliberately not retried within a run — production relies on the 
periodic validation runs to retry.
   - The test triggers a single validation run, so a still-pending transition 
at that moment makes the one-shot repair permanently miss the segment, and the 
URL wait can only time out.
   
   ## Fix
   
   Make the repair's precondition explicit instead of racing it:
   
   - Add `PauselessRealtimeTestUtils.waitForExternalViewToConverge` which polls 
until every instance of every segment in the ideal state reaches the prescribed 
state in the external view.
   - Call it in `BasePauselessRealtimeIngestionTest.runValidationAndVerify` 
after disabling the failure injection and before force-expiring + triggering 
the validation run.
   
   Convergence is guaranteed (the server already holds the locally built 
segment, so the ONLINE transition always eventually completes), so the wait is 
deterministic, and once the external view matches the ideal state the peer 
finder cannot miss. This also strengthens the tested contract: given a 
converged cluster, a **single** validation run must repair every stranded 
segment.
   
   For the ideal-state-update and new-segment-metadata failure scenarios the 
external view already trivially matches the ideal state, so the wait is a no-op 
there. One deliberate trade-off: if a state transition genuinely fails (segment 
ERROR in the external view), the test now fails fast at the convergence wait 
with a clear message instead of a misleading "missing url" timeout — that case 
was unrecoverable in a single run anyway, since the ERROR-reset happens after 
the upload step within the same run.
   


-- 
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]

Reply via email to