mvcc: fix count

release-3.1
Xiang Li 2016-08-10 10:50:53 -07:00
parent f505bcb91a
commit de864d3b58
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

@ -498,7 +498,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) {