Skip to content

[controller] Extract parent push job lifecycle manager - #2910

Open
eldernewborn wants to merge 2 commits into
linkedin:mainfrom
eldernewborn:eldernewborn/theomacy-pushjob
Open

[controller] Extract parent push job lifecycle manager#2910
eldernewborn wants to merge 2 commits into
linkedin:mainfrom
eldernewborn:eldernewborn/theomacy-pushjob

Conversation

@eldernewborn

@eldernewborn eldernewborn commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Problem Statement

VeniceParentHelixAdmin currently owns a large amount of parent push job lifecycle logic, including in-flight push detection, idempotent version creation, child-region push status aggregation, parent-side topic cleanup, degraded-mode push handling, and target-region/deferred-swap lifecycle handling.

This makes VeniceParentHelixAdmin harder to maintain and reason about because it mixes general parent admin responsibilities with push-job lifecycle orchestration.

Theomachy , ~-900

Solution

Extract parent push job lifecycle orchestration into a new package-private ParentPushJobLifecycleManager.

The new manager owns the parent-side push lifecycle logic that previously lived directly in VeniceParentHelixAdmin, while VeniceParentHelixAdmin keeps the existing API surface and delegates to the manager. This keeps the change mostly mechanical and behavior-preserving while reducing the size and responsibility of VeniceParentHelixAdmin.

This PR also removes unused lifecycle leftovers from VeniceParentHelixAdmin after the extraction.

No new config is introduced. No new dependencies are introduced. No protocol or schema compatibility changes are introduced.

Code changes

  • Added new code behind a config. If so list the config names and their default values in the PR description.
  • Introduced new log lines.
    • Confirmed if logs need to be rate limited to avoid excessive logging.

Concurrency-Specific Checks

Both reviewer and PR author to verify

  • Code has no race conditions or thread safety issues.
  • Proper synchronization mechanisms (e.g., synchronized, RWLock) are used where needed.
  • No blocking calls inside critical sections that could lead to deadlocks or performance degradation.
  • Verified thread-safe collections are used (e.g., ConcurrentHashMap, CopyOnWriteArrayList).
  • Validated proper exception handling in multi-threaded code to avoid silent thread termination.

How was this PR tested?

  • New unit tests added.
  • New integration tests added.
  • Modified or extended existing tests.
  • Verified backward compatibility (if applicable).

Ran:

./gradlew spotlessJavaCheck --quiet
./gradlew :services:venice-controller:compileJava
./gradlew :services:venice-controller:test --tests com.linkedin.venice.controller.TestVeniceParentHelixAdmin --tests com.linkedin.venice.controller.TestParentVersionOrchestrator --tests com.linkedin.venice.pushmonitor.PartitionStatusBasedPushMonitorTest
./gradlew :services:venice-controller:jacocoTestCoverageVerification
./gradlew :services:venice-controller:diffCoverage

@eldernewborn eldernewborn changed the title Eldernewborn/theomacy pushjob [controller] Extract parent push job lifecycle manager Jul 5, 2026
@eldernewborn
eldernewborn marked this pull request as ready for review July 5, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant