Add a version token on RPCs to read/update volume server states. (#8191)
* Add a version token on `GetState()`/`SetState()` RPCs for volume server states. * Make state version a property ov `VolumeServerState` instead of an in-memory counter. Also extend state atomicity to reads, instead of just writes.
This commit is contained in:
@@ -178,7 +178,7 @@ func (vs *VolumeServer) MaintenanceMode() bool {
|
||||
if vs.store == nil {
|
||||
return false
|
||||
}
|
||||
return vs.store.State.Pb.GetMaintenance()
|
||||
return vs.store.State.Proto().GetMaintenance()
|
||||
}
|
||||
|
||||
// Checks if a volume server is in maintenance mode, and returns an error explaining why.
|
||||
|
||||
Reference in New Issue
Block a user