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
@@ -168,7 +168,10 @@ your progress, history, listening counts, device names or your account.
|
||||
because other accounts share many podcasts. When the limit is reached,
|
||||
only podcasts of accounts beyond their part wait (newest shares first;
|
||||
cards already published are kept before new ones), and the podcast page
|
||||
says that the card is held back.
|
||||
says that the card is held back. Members' caches keep at most 256
|
||||
records per server, including revocations of the last 24 hours, so a
|
||||
new card also waits while recent revocations fill that room, and no
|
||||
published card is given up for a card the federation would not store.
|
||||
- A podcast whose stored data cannot be read (for example after a damaged
|
||||
import) is treated as not shared, and its card is revoked; the other
|
||||
podcasts are still published and revoked as usual.
|
||||
|
||||
+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