Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #1280 Sequence generates duplicate values #1281

Merged
merged 3 commits into from Apr 8, 2020
Merged

fix #1280 Sequence generates duplicate values #1281

merged 3 commits into from Apr 8, 2020

Conversation

ghost
Copy link

@ghost ghost commented Mar 27, 2020

hi,
Sequence may produce duplicate ids. This problem is solved here.

Fixes #1280


This change is Reviewable

@ghost ghost requested review from ashish-goswami, jarifibrahim, manishrjain and a team as code owners March 27, 2020 15:42
@CLAassistant
Copy link

CLAassistant commented Mar 27, 2020

CLA assistant check
All committers have signed the CLA.

db.go Outdated
return err
}

if num == seq.leased{

Choose a reason for hiding this comment

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

File is not gofmt-ed with -s (from gofmt)

Suggested change
if num == seq.leased{
if num == seq.leased {

db_test.go Outdated
for i:=0;i<5;i++{
num2, err := seq3.Next()
require.NoError(t, err)
require.NotEqual(t,num,num2)
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be nicer if we test here for the values we expect (3, 4, 5, etc)

Copy link
Author

Choose a reason for hiding this comment

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

Ok, modified

Copy link
Contributor

@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.

:lgtm: Thanks for fixing this @gamexg

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

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.

:lgtm:

Reviewed 2 of 2 files at r3.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @ashish-goswami, @GameXG, and @jarifibrahim)

@jarifibrahim jarifibrahim merged commit fa94030 into dgraph-io:master Apr 8, 2020
NamanJain8 pushed a commit that referenced this pull request Sep 8, 2020
Fix issue #1280

(cherry picked from commit fa94030)
NamanJain8 added a commit that referenced this pull request Sep 9, 2020
Fix issue #1280

(cherry picked from commit fa94030)

Co-authored-by: GameXG <[email protected]>
mYmNeo pushed a commit to mYmNeo/badger that referenced this pull request Jan 16, 2023
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.

Sequence generates duplicate values
4 participants