diff --git a/server/storage/mvcc/key_index.go b/server/storage/mvcc/key_index.go index 61a13b989..b5c624eac 100644 --- a/server/storage/mvcc/key_index.go +++ b/server/storage/mvcc/key_index.go @@ -37,7 +37,7 @@ var ( // For example: put(1.0);put(2.0);tombstone(3.0);put(4.0);tombstone(5.0) on key "foo" // generate a keyIndex: // key: "foo" -// rev: 5 +// modified: 5 // generations: // {empty} // {4.0, 5.0(t)} diff --git a/server/storage/mvcc/key_index_test.go b/server/storage/mvcc/key_index_test.go index b44bd4e0d..20ec5aef3 100644 --- a/server/storage/mvcc/key_index_test.go +++ b/server/storage/mvcc/key_index_test.go @@ -24,7 +24,7 @@ import ( func TestKeyIndexGet(t *testing.T) { // key: "foo" - // rev: 16 + // modified: 16 // generations: // {empty} // {{14, 0}[1], {14, 1}[2], {16, 0}(t)[3]} @@ -680,7 +680,7 @@ func TestGenerationWalk(t *testing.T) { func newTestKeyIndex(lg *zap.Logger) *keyIndex { // key: "foo" - // rev: 16 + // modified: 16 // generations: // {empty} // {{14, 0}[1], {14, 1}[2], {16, 0}(t)[3]} diff --git a/server/storage/mvcc/revision.go b/server/storage/mvcc/revision.go index d6213866f..a910e177a 100644 --- a/server/storage/mvcc/revision.go +++ b/server/storage/mvcc/revision.go @@ -59,9 +59,3 @@ func bytesToRev(bytes []byte) revision { sub: int64(binary.BigEndian.Uint64(bytes[9:])), } } - -type revisions []revision - -func (a revisions) Len() int { return len(a) } -func (a revisions) Less(i, j int) bool { return a[j].GreaterThan(a[i]) } -func (a revisions) Swap(i, j int) { a[i], a[j] = a[j], a[i] }