Skip to content

release/v2.2007 - feat(db): Add db.MaxVersion API (#1526)#1531

Merged
jarifibrahim merged 1 commit intorelease/v2.2007from
ibrahim/r2.2007-maxversion
Sep 21, 2020
Merged

release/v2.2007 - feat(db): Add db.MaxVersion API (#1526)#1531
jarifibrahim merged 1 commit intorelease/v2.2007from
ibrahim/r2.2007-maxversion

Conversation

@jarifibrahim
Copy link
Contributor

@jarifibrahim jarifibrahim commented Sep 21, 2020

This PR adds a new db.MaxVersion() API that returns the
maximum version across all keys in the DB.

(cherry picked from commit 36af85f)


This change is Reviewable

This PR adds a new `db.MaxVersion()` API that returns the
maximum version across all keys in the DB.

(cherry picked from commit 36af85f)
@jarifibrahim jarifibrahim changed the title feat(db): Add db.MaxVersion API (#1526) release/v2.2007 - feat(db): Add db.MaxVersion API (#1526) Sep 21, 2020
Copy link
Contributor

@manishrjain manishrjain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @ashish-goswami, @jarifibrahim, and @manishrjain)


db.go, line 1836 at r1 (raw file):

	stream.KeyToList = func(key []byte, itr *Iterator) (*pb.KVList, error) {
		maxVs := uint64(0)
		for ; itr.Valid(); itr.Next() {

Use ChooseKey instead.

Copy link
Contributor Author

@jarifibrahim jarifibrahim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @ashish-goswami and @manishrjain)


db.go, line 1836 at r1 (raw file):

Previously, manishrjain (Manish R Jain) wrote…

Use ChooseKey instead.

Created a PR for this #1532 . This is a cherry-pick PR.

@jarifibrahim jarifibrahim merged commit 7c169e9 into release/v2.2007 Sep 21, 2020
@jarifibrahim jarifibrahim deleted the ibrahim/r2.2007-maxversion branch September 21, 2020 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants