Repository navigation
feat(atlas): serve-mode shard fan-out with re-discovery (#6666 slice 1) - #11216
Conversation
ShardedBackend set behind RwLock with with_refresh/refresh_shard_set: periodic re-discovery swaps the set atomically on snapshot change, invalidating the snapshot-bound result cache. Service config gains shards + shard_refresh_seconds in both mirrored server.rs copies (parity guard passes); atlas-search serve and fleet serve search wire the sharded backend when a spec is configured, discovered at the service-maximum ceiling. Standalone --shards unchanged. Slice 3 (libsql embedded replicas) split to #11213.
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 56 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
#6666 slice 1: serve-mode shard fan-out with re-discovery
Wires
ShardedBackendinto both serve paths so promoted shards are observed without a restart (the remaining slice-2/3 work on #6666 is tracked separately — see below).shards/scan.rs):ShardedBackend's shard set now sits behind anRwLock. Newwith_refresh(spec, ceiling, interval)+refresh_shard_set(): re-opens the set from the spec and swaps it in atomically whensnapshot_id()changes; discovery failures keep the previous set and record a diagnostic note.snapshot_id()andbranch_pools()consult the current set (interval-gated opportunistic refresh), so the snapshot-bound result cache (atlas-search: snapshot-bound result cache — per-service memory, snapshot-rotation invalidation (#5668 slice 3) #9943) invalidates on rotation — that chain is the slice-2 end-to-end proof at the backend level, pinned bysharded_backend_refresh_swaps_in_new_shards_and_moves_the_snapshot(a shard file appearing in adir:spec joins on refresh and the snapshot moves).server.rs, both mirrored copies — parity guard passes): new optionalshardsspec (standalone--shardsgrammar) andshard_refresh_seconds(default 60, must be ≥ 1; empty spec rejected) onServeSettings.atlas-search serve,fleet serve search): with a spec configured, discovery opens at the service maximum (highest clientceiling_cap) and the vector branch is served by the refreshing sharded backend; without one, the monolith serves exactly as before. Standalone--shardspath unchanged.Tests: atlas-core shard suite incl. the new refresh test;
service_config_shards_spec_round_tripsin both server copies; fleet-search parity script OK.Not in this PR: slice 3 (embedded replicas)
Design §5.5 embedded replicas are libSQL local-copy mode. The workspace has no
libsqlcrate today (transports are a hand-rolled HTTPS pipeline + rusqlite local files), so slice 3 is a new-dependency + live-Turso-verification effort of its own; it is filed and routed separately and #6666 stays open for it.Refs #6666
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.