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:
@@ -42,11 +42,8 @@ func TestMaintenanceMode(t *testing.T) {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
vs := VolumeServer{
|
||||
store: &storage.Store{
|
||||
Id: "test_1234",
|
||||
State: &storage.State{
|
||||
FilePath: "/some/path.pb",
|
||||
Pb: tc.pb,
|
||||
},
|
||||
Id: "test_1234",
|
||||
State: storage.NewStateFromProto("/some/path.pb", tc.pb),
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user