Skip to content

feat(shard-distributor): integrate executor cleanup with shard assignment#7440

Merged
jakobht merged 7 commits intocadence-workflow:masterfrom
jakobht:consistentDBState
Nov 18, 2025
Merged

feat(shard-distributor): integrate executor cleanup with shard assignment#7440
jakobht merged 7 commits intocadence-workflow:masterfrom
jakobht:consistentDBState

Conversation

@jakobht
Copy link
Member

@jakobht jakobht commented Nov 14, 2025

What changed?
Integrated executor cleanup into the shard assignment loop to ensure all shards always have an owner. Executor deletion now happens atomically with shard reassignment in a single ETCD transaction.

Why?
Previously, the cleanup loop would delete stale executors separately from shard assignment, creating a window where shards could be left without an owner. This integration ensures atomic deletion and reassignment.

How did you test it?

  • Unit tests
  • Verified ETCD transaction includes proper ModRevision comparisons to prevent race conditions
  • Local tests

Potential risks
Low - changes are localized to the experimental shard distributor service with proper transactional guards.

Release notes
N/A - experimental feature only

Documentation Changes
None

…ures shards are not ownerless

Signed-off-by: Jakob Haahr Taankvist <jht@uber.com>
Signed-off-by: Jakob Haahr Taankvist <jht@uber.com>
Signed-off-by: Jakob Haahr Taankvist <jht@uber.com>
Signed-off-by: Jakob Haahr Taankvist <jht@uber.com>
Signed-off-by: Jakob Haahr Taankvist <jht@uber.com>
Signed-off-by: Jakob Haahr Taankvist <jht@uber.com>
Signed-off-by: Jakob Haahr Taankvist <jht@uber.com>
@jakobht jakobht merged commit 748fc7d into cadence-workflow:master Nov 18, 2025
43 checks passed
@jakobht jakobht deleted the consistentDBState branch March 2, 2026 11:29
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.

2 participants