mvcc: fix count

This commit is contained in:
Xiang Li 2016-08-10 10:50:53 -07:00 committed by Gyu-Ho Lee
parent 606d79afc4
commit ec576ee5ac
2 changed files with 4 additions and 1 deletions

View File

@ -245,6 +245,9 @@ func testKVRangeLimit(t *testing.T, f rangeFunc) {
if 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))
}
}
}

View File

@ -497,7 +497,7 @@ func (s *store) rangeKeys(key, end []byte, limit, rangeRev int64, countOnly bool
break
}
}
return kvs, len(kvs), curRev, nil
return kvs, len(revpairs), curRev, nil
}
func (s *store) put(key, value []byte, leaseID lease.LeaseID) {