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:
Lisandro Pin
2026-02-06 19:58:43 +01:00
committed by GitHub
parent c44716f9af
commit 2cda4289f4
8 changed files with 104 additions and 54 deletions

View File

@@ -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),
},
}