-
Notifications
You must be signed in to change notification settings - Fork 634
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(cursor): Last
method needs skip empty pages
#341
Conversation
Last
method needs skip empty pages
Before I have a deep dive into this PR, please answer question below:
|
I found this problem while reading bbolt source code. There is a test case Line 511 in 3d8280f
|
Thanks for the feedback. Will take a look later. Recently we added some workflow, so please rebase this PR. |
0cb7bb1
to
6f56243
Compare
@ahrtr hi, I need your approval to execute the test workflow |
Please always rebase PR instead of merging master. Please also squash the commits. |
6f56243
to
8a5b15f
Compare
ok, it has been changed to rebase |
8dd9538
to
c413227
Compare
Confirmed that it's an real issue, and overall looks good to me. |
Please also add an item something like below into CHANGE,
|
c413227
to
6519b69
Compare
Signed-off-by: dchaofei <dchaofei@163.com>
6519b69
to
f191880
Compare
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.
In the same transaction,
Detete
may cause the last page to be empty. In this case, calling the Last method will return nill instead of the value of the previous page, which is incorrect.Last
method should return 1000Delete
method to delete the last 800 elementsLast
method again returns nil, but I think it should return 200