storage: stop keeping the remote storage key on the master (#10672)

A master decides nothing from it. Every caller that read it was asking whether
a volume is remote, which the backend name answers, and the value itself is
reported on demand by the server holding the volume, through the volume info in
ReadVolumeFileStatus.

It is also the one string here that cannot be shared: unique per volume, so
unlike the collection and backend names it carries its own characters for every
volume a master tracks.

VolumeInfo goes from 136 bytes to 120. 800k volumes registered from a heartbeat
that has been over the wire go from 214 to 163 B/volume when tiered.

The volume server's own status page keeps showing the key, now read from the
volume it holds rather than relayed through a master, which is also where the
other volume server implementation reads it.

The heartbeat digest drops it on the same grounds: a change to something the
master does not hold cannot make its copy stale. Both implementations and their
shared vectors move together, and the field-coverage test now names what is
deliberately not retained rather than being loosened.
This commit is contained in:
Chris Lu
2026-08-09 12:43:31 -07:00
committed by GitHub
parent 0f7a64c596
commit f09e8345c6
13 changed files with 50 additions and 31 deletions
+3 -3
View File
@@ -964,11 +964,11 @@ func selectVolumeIdsFromTopology(topologyInfo *master_pb.TopologyInfo, volumeSiz
totalVolumes++
// ignore remote volumes
if v.RemoteStorageName != "" && v.RemoteStorageKey != "" {
if v.RemoteStorageName != "" {
remoteVolumes++
if verbose {
fmt.Printf("skip volume %d on %s: remote volume (storage: %s, key: %s)\n",
v.Id, dn.Id, v.RemoteStorageName, v.RemoteStorageKey)
fmt.Printf("skip volume %d on %s: remote volume (storage: %s)\n",
v.Id, dn.Id, v.RemoteStorageName)
}
continue
}