Make segment-replace timeouts and endReplaceSegments convergence wait configurable - #19278
Open
shounakmk219 wants to merge 1 commit into
Open
Make segment-replace timeouts and endReplaceSegments convergence wait configurable#19278shounakmk219 wants to merge 1 commit into
shounakmk219 wants to merge 1 commit into
Conversation
… configurable Expose the previously hard-coded socket/convergence timeouts on the minion segment-replace path as configuration, with backward-compatible defaults: - Controller: the endReplaceSegments IdealState -> ExternalView convergence wait, poll interval, and retry-attempt count are now read from controller config (controller.segment.replace.externalViewMaxWaitMs / .externalViewCheckIntervalMs / .maxRetryAttempts), defaulting to the prior hard-coded 10min / 1s / 5. - Minion: the startReplaceSegments and segment-upload socket timeouts are now configurable (pinot.minion.startReplaceSegments.timeoutMs and the segmentUploadRequestTimeoutMs task config); the endReplaceSegments timeout was already configurable. - HttpClient.sendRequest now sets an explicit connection-request (pool checkout) timeout instead of silently inheriting the Apache HttpClient default. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
@shounakmk219 do you think it makes sense to have these configs hot reloadable? I think we should do it. |
Collaborator
Author
That's a good point @jineshparakh, I wanted to have them hot reloadable as well but currently there is no place in PinotHelixResourceManager where we can listen to cluster config changes and apply them. Creating new tooling felt like over kill for the timeouts which are rarely touched |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Minion → controller segment-replace requests (
startReplaceSegments/endReplaceSegments/ segment upload) can run for a long time. In particular, the controller handlesendReplaceSegmentssynchronously, blocking on IdealState → ExternalView convergence, which for large tables can take many minutes. Several of the governing timeouts were hard-coded, so the client socket timeout and the controller-side work time could not be aligned per deployment.This change exposes those knobs as configuration, all with backward-compatible defaults (no behavior change unless configured).
Controller convergence wait (
PinotHelixResourceManager.endReplaceSegments)Previously hard-coded (
// TODO: make this configurable). Now read from controller config:controller.segment.replace.externalViewMaxWaitMscontroller.segment.replace.externalViewCheckIntervalMscontroller.segment.replace.maxRetryAttemptsThe values are resolved once from
ControllerConf(falling back to the existing static constants), and the retry policy wrappingendReplaceSegmentsis built from the configured attempt count.Minion client socket timeouts
pinot.minion.startReplaceSegments.timeoutMs(new, default 10 min) — wired throughSegmentConversionUtils.startSegmentReplace(newsocketTimeoutMsoverload) andBaseMultipleSegmentsConversionExecutor.segmentUploadRequestTimeoutMstask config (new, default 10 min) — read insideSegmentConversionUtils.uploadSegment, alongside the existing retry knobs.endReplaceSegmentstimeout was already configurable (pinot.minion.endReplaceSegments.timeoutMs).HttpClient
HttpClient.sendRequestnow sets an explicit connection-request (pool checkout) timeout instead of silently inheriting the Apache HttpClient default, so a saturated pool cannot block a replace/upload request unboundedly. The TCP connect timeout remains tunable via the existinghttp.client.connectionTimeoutMs.Testing
ControllerConfTest— defaults and overrides for the three new controller keys.MinionConfTest— defaults/overrides for the start/end replace-segments timeouts.mvn spotless:apply checkstyle:check license:checkclean on all touched modules.🤖 Generated with Claude Code