From b827143db50f1a60b84aaea0844adc48ee662e40 Mon Sep 17 00:00:00 2001 From: Steve Simpson Date: Wed, 24 Nov 2021 20:21:40 +0100 Subject: [PATCH] Improve comment about not copying. --- kv/memberlist/memberlist_client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kv/memberlist/memberlist_client.go b/kv/memberlist/memberlist_client.go index de75c4f6a..7b106b69f 100644 --- a/kv/memberlist/memberlist_client.go +++ b/kv/memberlist/memberlist_client.go @@ -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]