Skip to content

Commit

Permalink
Merge pull request #9039 from gyuho/mvcc-doc
Browse files Browse the repository at this point in the history
mvcc: clean-up godoc in key_index.go
  • Loading branch information
gyuho committed Dec 18, 2017
2 parents eb58e76 + 76dd9d5 commit a7445d7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions mvcc/key_index.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ var (
// rev except the largest one. If the generation becomes empty
// during compaction, it will be removed. if all the generations get
// removed, the keyIndex should be removed.

//
// For example:
// compact(2) on the previous example
// generations:
Expand Down Expand Up @@ -223,9 +223,8 @@ func (ki *keyIndex) keep(atRev int64, available map[revision]struct{}) {
}

func (ki *keyIndex) doCompact(atRev int64, available map[revision]struct{}) (genIdx int, revIndex int) {
// walk until reaching the first revision that has an revision smaller or equal to
// the atRev.
// add it to the available map
// walk until reaching the first revision smaller or equal to "atRev",
// and add the revision to the available map
f := func(rev revision) bool {
if rev.main <= atRev {
available[rev] = struct{}{}
Expand Down

0 comments on commit a7445d7

Please sign in to comment.