mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 02:27:26 +01:00
* seaweed-volume: a shard the master places nowhere is not a known location The master answers LookupEcVolume with every shard slot it tracks, so a shard whose holders are all down comes back with no locations. The cache kept those entries. They overwrote the cached address of a holder that was only restarting, counted toward the reply's data-shard guard, which therefore always passed, and made the map look neither short nor complete, so it was re-checked only every 7 minutes. Nothing marked it stale meanwhile: a read never tries a shard with no address. A shard with no location is now left out of the reply, as Go's cachedLookupEcShardLocations does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * storage: count only placed shards toward an EC lookup's completeness The master answers every shard slot, so len(ShardIdLocations) is 32 whatever is up, and the guard that should keep a partial reply from replacing a complete cache never fired. A reply placing fewer than the data shards now fails the lookup and leaves the cache as it was, as the Rust server does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * storage: fill a cold EC location cache from a partial lookup A reply placing fewer than the data shards no longer reaches the cache at all, so a cold cache stays empty and a read cannot go straight to a shard whose holder is up, as it could before the guard counted placed shards. Take the holders it names for shards the cache does not know, without touching known shards or the refresh time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-volume: fill a cold EC location cache from a partial lookup write_back_shard_locations refused a reply placing fewer than the data shards before writing anything, so a read on a cold cache kept an empty map and could not fetch a shard directly from a holder the master did name. A partial now fills only the shards the cache does not know, leaves the refresh time alone and marks the map stale, as Go does. The scrub still refuses a partial reply. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * storage: a partial EC lookup puts the holders it names first A partial reply only filled shards the cache did not know, so a shard that moved while the replies stayed partial kept its old address: a failed direct read marked the map stale, the next partial reply skipped the shard again, and the read fell back to a reconstruction that the partial outage could not serve. A partial reply now puts the holders it names ahead of the cached ones, which stay as fallback. Other shards and the refresh time stay as they were. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-volume: drop a shard the master places nowhere from the location cache Leaving shards with no location out of the reply let a complete reply keep a former holder's cached address for a shard the master now places nowhere. An EC delete tried that address first: an offline peer failed the delete without the fallback to other shard holders, and a peer that had unmounted the volume acknowledged it without writing a tombstone. The reply now keeps every slot and only located shards count toward its completeness. A complete reply drops a shard it places nowhere, as Go's delete-then-append does, and a partial reply's empty slots add nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-volume: a partial EC lookup puts the holders it names first fill_shard_location_gaps took a partial reply's holders only for shards the cache did not know, so a shard that moved while the replies stayed partial kept its old address and a read could not reach it directly. merge_partial_shard_locations puts the holders the reply names ahead of the cached ones, which stay as fallback, as Go does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>