Keep replica room for the cards a rebalance publishes
Replicas count unexpired tombstones toward the 256 records per publisher and refuse new keys beyond it. A round now admits at most as many podcasts that need a new key as that room allows, so a fair-share rebalance never displaces cards for newcomers the replicas would refuse. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4b45aa5805
commit
767134d1dd
3 files changed
+213
-27
No files matched your search
+6
-1
@@ -248,7 +248,12 @@ only while the overlay runs.
|
||||
each account's queue holds its podcasts the node already publishes
|
||||
first, then by its own share time; in every round each account takes its
|
||||
next podcast not taken yet, published ones first inside a round. An
|
||||
account's share times therefore only order its own podcasts.
|
||||
account's share times therefore only order its own podcasts. A podcast
|
||||
without a live record of the node (an active card or an unexpired
|
||||
tombstone, `Incumbents::live_keys`) needs a new replica key; at most
|
||||
`256 - live keys` of them are taken per round (`Incumbents::key_headroom`),
|
||||
the others wait in `over_limit`, so a rebalance never displaces more
|
||||
cards than replicas accept new ones for.
|
||||
`PodcastDht::sync_shares` publishes the result and tombstones everything
|
||||
else. The podcasts left out (`over_limit`) and those `sync_shares`
|
||||
reported as failed are kept in memory for `ShareView.held`.
|
||||
|
||||
Reference in new issue
Block a user