Skip to content

Commit

Permalink
Improve comment about not copying.
Browse files Browse the repository at this point in the history
  • Loading branch information
stevesg committed Nov 24, 2021
1 parent 2e865ae commit b827143
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kv/memberlist/memberlist_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,7 @@ func (m *KV) mergeValueForKey(key string, incomingValue Mergeable, casVersion ui
m.storeMu.Lock()
defer m.storeMu.Unlock()

// Note that we do not take a copy of the store value here, it is modified in-place.
// Note that we do not take a deep copy of curr.value here, it is modified in-place.
// This is safe because the entire function runs under the store lock; we do not return
// the full state anywhere as is done elsewhere (i.e. Get/WatchKey/CAS).
curr := m.store[key]
Expand Down

0 comments on commit b827143

Please # to comment.