mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
mvcc: fix count
This commit is contained in:
parent
f505bcb91a
commit
de864d3b58
@ -245,6 +245,9 @@ func testKVRangeLimit(t *testing.T, f rangeFunc) {
|
|||||||
if r.Rev != wrev {
|
if r.Rev != wrev {
|
||||||
t.Errorf("#%d: rev = %d, want %d", i, r.Rev, wrev)
|
t.Errorf("#%d: rev = %d, want %d", i, r.Rev, wrev)
|
||||||
}
|
}
|
||||||
|
if r.Count != len(kvs) {
|
||||||
|
t.Errorf("#%d: count = %d, want %d", i, r.Count, len(kvs))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -498,7 +498,7 @@ func (s *store) rangeKeys(key, end []byte, limit, rangeRev int64, countOnly bool
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return kvs, len(kvs), curRev, nil
|
return kvs, len(revpairs), curRev, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *store) put(key, value []byte, leaseID lease.LeaseID) {
|
func (s *store) put(key, value []byte, leaseID lease.LeaseID) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user