feat(server-ng): close the partition materialisation race at the owner - #3786
Open
krishvishal wants to merge 1 commit into
Open
feat(server-ng): close the partition materialisation race at the owner#3786krishvishal wants to merge 1 commit into
krishvishal wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3786 +/- ##
=============================================
- Coverage 75.58% 55.77% -19.81%
Complexity 969 969
=============================================
Files 1317 1315 -2
Lines 155244 137476 -17768
Branches 128866 111178 -17688
=============================================
- Hits 117339 76681 -40658
- Misses 34361 57353 +22992
+ Partials 3544 3442 -102
🚀 New features to boost your workflow:
|
krishvishal
force-pushed
the
part-mat-barrier
branch
from
July 31, 2026 21:58
fae7aa1 to
2c2610e
Compare
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
create_topicreturns on metadata commit; the owning shard publishes the partition only afterbuild_partition_fresh(mkdir, segment open, fallocate). A produce issued right after races materialisation, on every shard.partition_reconcilercarried a TODO for a materialisation barrier: stop non-owners seedingshards_tablerows, have the owner push its row to peers, so row presence implies the partition exists.Rejected. It turns a deterministic hash cache into a distributed readiness protocol whose deltas need ordering, retry and repair, and it gives up level-triggered repair (a pass re-derives every row from committed metadata, so a lost row is rewritten). The owner can decide all of it locally.
Approach
Resolve at the owner;
shards_tablestays a hint.router::route_typedfalls back tocalculate_shard_assignmenton a missing row, so an early frame reaches the future owner.park_if_unmaterialisedholds it until the matchingInsertOwned, then re-queues onto that shard's inbox.serves_committed_incarnationrefuses a namespace whose committedcreated_revisiondisagrees with the row epoch, so a mid-teardown request cannot be acked against an incarnation about to be erased.Tombstoned namespace, park overflow, and a namespace the shard gave up building all reply with a retriable status. No silence, so no lockstep transport waits out its read timeout.