MCPcopy
hub / github.com/etcd-io/etcd / Reset

Method Reset

tests/robustness/traffic/kubernetes.go:314–325  ·  view source on GitHub ↗
(revision int64, kvs []*mvccpb.KeyValue)

Source from the content-addressed store, hash-verified

312}
313
314func (s *storage) Reset(revision int64, kvs []*mvccpb.KeyValue) {
315 s.mux.Lock()
316 defer s.mux.Unlock()
317 if revision <= s.revision {
318 return
319 }
320 s.keyRevision = make(map[string]int64, len(kvs))
321 for _, kv := range kvs {
322 s.keyRevision[string(kv.Key)] = kv.ModRevision
323 }
324 s.revision = revision
325}
326
327func (s *storage) Count() int {
328 s.mux.RLock()

Callers 2

BeforeTestFunction · 0.45
ReadMethod · 0.45

Calls 2

LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected