-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Conversation
db.go
Outdated
return err | ||
} | ||
|
||
if num == seq.leased{ |
There was a problem hiding this comment.
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
)
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) |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, modified
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this @gamexg
Reviewable status: 0 of 2 files reviewed, 2 unresolved discussions (waiting on @ashish-goswami, @GameXG, @jarifibrahim, and @manishrjain)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r3.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @ashish-goswami, @GameXG, and @jarifibrahim)
Fix issue #1280 (cherry picked from commit fa94030) Co-authored-by: GameXG <[email protected]>
) Fix issue dgraph-io#1280 (cherry picked from commit fa94030) Co-authored-by: GameXG <[email protected]>
hi,
Sequence may produce duplicate ids. This problem is solved here.
Fixes #1280
This change is