*: kv range to return current revision

This changes the behavior of KV's range and tx range to return
current revision rather than range revision. This makes populating
range response header easier.
This commit is contained in:
Gyu-Ho Lee
2016-01-30 16:51:12 -08:00
parent 6577df17d6
commit f6215574f2
5 changed files with 123 additions and 10 deletions

View File

@ -1188,10 +1188,7 @@ func TestV3RangeRequest(t *testing.T) {
if resp.More != tt.wmores[j] {
t.Errorf("#%d.%d: bad more. got = %v, want = %v, ", i, j, resp.More, tt.wmores[j])
}
wrev := req.Revision
if wrev == 0 {
wrev = int64(len(tt.putKeys) + 1)
}
wrev := int64(len(tt.putKeys) + 1)
if resp.Header.Revision != wrev {
t.Errorf("#%d.%d: bad header revision. got = %d. want = %d", i, j, resp.Header.Revision, wrev)
}