Repository navigation
refactor(server): prepare geo code for the deterministic simulator - #5056
Open
krishvishal wants to merge 8 commits into
Open
krishvishal wants to merge 8 commits into
krishvishal wants to merge 8 commits into
Conversation
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (19.13%) is below the target coverage (50.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #5056 +/- ##
============================================
- Coverage 92.26% 91.62% -0.64%
+ Complexity 4367 4364 -3
============================================
Files 1592 1593 +1
Lines 436807 422044 -14763
Branches 365039 350277 -14762
============================================
- Hits 403019 386717 -16302
- Misses 28172 29308 +1136
- Partials 5616 6019 +403
🚀 New features to boost your workflow:
|
krishvishal
force-pushed
the
sim-geo-dc
branch
from
November 25, 2026 07:51
d826ef7 to
8268a09
Compare
spetz
requested changes
Nov 25, 2026
spetz
left a comment
Contributor
There was a problem hiding this comment.
Please fix the fresh-sweep panic on valid filesystem timestamps and the obsolete indexes left behind by fileless shadows. The inline comments also cover the cost of memory index reads.
krishvishal
force-pushed
the
sim-geo-dc
branch
from
November 25, 2026 12:49
f5ac56b to
f7bbbe2
Compare
Production buses still read the system clock, so only the simulator sees a change.
Boot and the simulator give a shard its tier service, readiness and writers with the same function.
The reconciler and the simulator call one GeoPasses with the time of their own clock.
Polls of remote and peer segments write, open and remove their .index files through IndexFiles, whose default is the local disk.
Boot and the simulator hand a shard its peer stores with one function, and the simulator builds shadow partitions with peer_log_of.
HashMaps ordered the manifest reads and the rewrite passes differently per process, so a simulated geo run did not replay from its seed.
Simulated partitions keep no files, and their polls answered empty instead of reading the peer's store.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
krishvishal
force-pushed
the
sim-geo-dc
branch
from
November 28, 2026 17:40
f7bbbe2 to
1af1100
Compare
This branch has not been deployed
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.
Rationale
Geo topics replicate between two clusters through their object store buckets. A failover bug in this path shows only under crashes, store faults and clock skew, and a failed run must replay from its seed. The deterministic simulator gives this. But the geo code reads the system clock and runs its store reads on compio timers, so a simulated run of it does not repeat. This PR prepares the server code for the simulator and changes no behavior in production. The simulator changes come in a second PR, stacked on this one.
What changed?
Before, the geo code in
shardand the store reads inpartitionsreadInstant::now,SystemTime::nowandIggyTimestamp::now. They also timed and spawned their work on compio directly, so a simulated run mixed virtual time with real time. Now they read the clock of the shard's message bus (realtime_micros,monotonic_now). The store reads run their timeouts, backoff and index fetches on aReadRuntimethat the shard gives them.IggyMessageBusreads the system clock and runs on compio, so production timing does not change.