[controller] Throttle parent-controller version-creation attempts - #2954
Open
pthirun wants to merge 10 commits into
Open
[controller] Throttle parent-controller version-creation attempts#2954pthirun wants to merge 10 commits into
pthirun wants to merge 10 commits into
Conversation
pthirun
marked this pull request as ready for review
August 5, 2026 18:38
pthirun
marked this pull request as draft
August 10, 2026 22:05
pthirun
marked this pull request as ready for review
August 11, 2026 08:41
Prevent rapid version creation after a failed full push while preserving idempotent retries and successful push behavior. The cooldown uses persisted version creation timestamps so controller failover does not reset enforcement. Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Apply cluster-level spacing to every user-store batch or stream-reprocessing version creation using persisted creation time. Preserve same-push ID idempotency and existing ongoing-push handling while excluding system stores and non-version-creating pushes. Rename the config, policy, metrics, messages, and tests to status-neutral terminology. Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Reserve user-store version-creation attempts in Store metadata before lifecycle hooks, topics, or version resources are created. This keeps the fixed cooldown window durable across controller failover and failed creation attempts while preserving same-push idempotent recovery. Use the latest persisted Version creation time as an upgrade fallback, keep explicit-version and non-batch paths excluded, and add model, policy, controller, and integration coverage. Co-authored-by: Copilot <[email protected]>
pthirun
force-pushed
the
pthirunavukkarasu/push-retry-cooldown
branch
from
August 12, 2026 20:30
b2b128f to
b7650b4
Compare
pthirun
marked this pull request as draft
August 12, 2026 20:31
pthirun
marked this pull request as ready for review
August 12, 2026 21:42
Co-authored-by: Copilot <[email protected]>
pthirun
marked this pull request as draft
August 12, 2026 22:09
pthirun
marked this pull request as ready for review
August 12, 2026 22:12
Use an atomic process-local cooldown in the parent controller immediately before version creation. This limits rapid different-ID retries while preserving same-ID idempotency and avoiding durable metadata changes. Co-authored-by: Copilot <[email protected]>
pthirun
marked this pull request as draft
August 13, 2026 21:59
pthirun
marked this pull request as ready for review
August 13, 2026 22:47
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.
Problem Statement
Rapid retries with different push IDs can repeatedly reach version creation after an earlier attempt fails before any durable Version metadata or resources exist. Venice needs a best-effort abuse/throttling guard without adding durable store state, schema changes, ZK nodes, or admin protocol fields.
Solution
controller.push.retry.cooldown.msconfig with a default of600000ms (10 minutes);0disables the mechanism.BATCHandSTREAM_REPROCESSINGrequests that are about to create a new version. Venice system stores,STREAM,INCREMENTAL, explicit-version child/admin processing, and migration replication are excluded.ConcurrentHashMapentry keyed by cluster/store immediately beforeaddVersionAndTopicOnly(), before lifecycle hooks, version metadata, topics, push monitoring, or Helix resources.Code changes
controller.push.retry.cooldown.ms; default:600000ms.Concurrency-Specific Checks
Both reviewer and PR author to verify
ConcurrentHashMap.compute.synchronized,RWLock) are used where needed. No additional lock is required beyond the atomic map operation.ConcurrentHashMap,CopyOnWriteArrayList).How was this PR tested?
Commands run successfully:
./gradlew :services:venice-controller:test --tests com.linkedin.venice.controller.TestVeniceParentHelixAdmin --tests com.linkedin.venice.controller.TestVeniceControllerClusterConfig --tests com.linkedin.venice.controller.stats.VeniceAdminOtelMetricEntityTest --tests com.linkedin.venice.controller.stats.VeniceAdminStatsOtelTest --tests com.linkedin.venice.controller.stats.VeniceAdminTehutiMetricNameEnumTest --no-daemon./gradlew :internal:venice-test-common:integrationTest --tests com.linkedin.venice.controller.VeniceParentHelixAdminTest.testPushRetryCooldownThroughControllerApi --no-daemon./gradlew :internal:venice-test-common:integrationTest --tests com.linkedin.venice.controller.VeniceParentHelixAdminTest.testAddVersion --no-daemon./gradlew spotlessCheck --no-daemonThe focused integration test uses a deterministic failing pre-version lifecycle hook, verifies the first admitted attempt creates no Version, version topic, or child Helix resource, verifies a different push ID receives HTTP 429 before resources, then removes the failure and confirms the original push ID succeeds.
Does this PR introduce any user-facing or breaking changes?
When enabled, a new push ID for a user-store
BATCHorSTREAM_REPROCESSINGversion-creation attempt can receive HTTP 429 during the configured process-local cooldown. Same-push-ID retries remain idempotently admissible. The guard does not survive parent-controller restart or leadership handoff by design, and no durable metadata or schemas change.🤖 Generated with GitHub Copilot CLI