Skip to content

Commit

Permalink
Use node ModRevision consistently in etcd2topo implementation
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Lord <[email protected]>
  • Loading branch information
mattlord committed May 6, 2024
1 parent f27d287 commit d49f984
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion go/vt/topo/etcd2topo/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ func (s *Server) Watch(ctx context.Context, filePath string) (*topo.WatchData, <
}
wd := &topo.WatchData{
Contents: initial.Kvs[0].Value,
Version: EtcdVersion(initial.Kvs[0].Version),
// ModRevision is used for the topo.Version value as we get the new Revision value back
// when updating the file/key within a transaction in file.go and so this is the opaque
// version that we can use to enforce serializabile writes for the file/key.
Version: EtcdVersion(initial.Kvs[0].ModRevision),
}

// Create an outer context that will be canceled on return and will cancel all inner watches.
Expand Down

0 comments on commit d49f984

Please sign in to comment.