-
Notifications
You must be signed in to change notification settings - Fork 53
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
driver: fix duplicate id error with mvvc on #211
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
olegrok
reviewed
Jul 6, 2023
Totktonada
reviewed
Jul 6, 2023
Totktonada
reviewed
Jul 6, 2023
better0fdead
force-pushed
the
better0fdead/gh-207-mvcc
branch
3 times, most recently
from
July 10, 2023 10:09
19fc693
to
2a5186b
Compare
LeonidVas
requested changes
Jul 11, 2023
better0fdead
force-pushed
the
better0fdead/gh-207-mvcc
branch
2 times, most recently
from
July 11, 2023 12:29
b617331
to
fe3ddee
Compare
better0fdead
force-pushed
the
better0fdead/gh-207-mvcc
branch
2 times, most recently
from
July 27, 2023 12:30
41a6c02
to
fcb50b5
Compare
oleg-jukovec
added a commit
to tarantool/sharded-queue
that referenced
this pull request
Aug 10, 2023
By default idx:max() or idx:min() have read confirmed isolation level. It could lead to a task duplication or double task take when we already insert or update a task, commited, but it is not yet confirmed. See also: 1. tarantool/queue#207 2. tarantool/queue#211
oleg-jukovec
added a commit
to tarantool/sharded-queue
that referenced
this pull request
Aug 10, 2023
By default idx:max() or idx:min() have read confirmed isolation level. It could lead to a task duplication or double task take when we already insert or update a task, commited, but it is not yet confirmed. See also: 1. tarantool/queue#207 2. tarantool/queue#211
oleg-jukovec
added a commit
to tarantool/sharded-queue
that referenced
this pull request
Aug 10, 2023
By default idx:max() or idx:min() have read confirmed isolation level. It could lead to a task duplication or double task take when we already insert or update a task, commited, but it is not yet confirmed. See also: 1. tarantool/queue#207 2. tarantool/queue#211
better0fdead
force-pushed
the
better0fdead/gh-207-mvcc
branch
from
August 10, 2023 15:52
fcb50b5
to
8db176b
Compare
LeonidVas
requested changes
Aug 14, 2023
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.
Hi! Thank you for the patchset.
See several comments bellow.
better0fdead
force-pushed
the
better0fdead/gh-207-mvcc
branch
3 times, most recently
from
August 15, 2023 17:16
48214b9
to
a65f81e
Compare
LeonidVas
requested changes
Aug 16, 2023
better0fdead
force-pushed
the
better0fdead/gh-207-mvcc
branch
from
August 16, 2023 10:54
a65f81e
to
85ac939
Compare
Taking the maximum or minimum of the index is an implicit transactions, so it is always done with 'read-confirmed' mvcc isolation level. It can lead to errors when trying to make parallel 'put' or 'take' calls with mvcc enabled. It is hapenning because 'max' or 'min' for several puts in parallel will be the same since read confirmed isolation level makes visible all transactions that finished the commit. To fix it we wrap it with box.begin/commit and set right isolation level. Current fix does not resolve that bug in situations when we already are in transaction since it will open nested transactions. Part of #207
LeonidVas
force-pushed
the
better0fdead/gh-207-mvcc
branch
from
August 16, 2023 17:12
85ac939
to
51c79c8
Compare
oleg-jukovec
added a commit
to tarantool/sharded-queue
that referenced
this pull request
Sep 6, 2023
By default idx:max() or idx:min() have read confirmed isolation level. It could lead to a task duplication or double task take when we already insert or update a task, commited, but it is not yet confirmed. See also: 1. tarantool/queue#207 2. tarantool/queue#211
oleg-jukovec
added a commit
to tarantool/sharded-queue
that referenced
this pull request
Sep 25, 2023
By default idx:max() or idx:min() have read confirmed isolation level. It could lead to a task duplication or double task take when we already insert or update a task, commited, but it is not yet confirmed. See also: 1. tarantool/queue#207 2. tarantool/queue#211
oleg-jukovec
added a commit
to tarantool/sharded-queue
that referenced
this pull request
Oct 31, 2023
By default idx:max() or idx:min() have read confirmed isolation level. It could lead to a task duplication or double task take when we already insert or update a task, commited, but it is not yet confirmed. See also: 1. tarantool/queue#207 2. tarantool/queue#211
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Taking the maximum of the index is an implicit transactions, so it is
always done with 'read-confirmed' mvcc isolation level.
It can lead to errors when trying to make parallel 'put' calls with mvcc enabled.
It is hapenning because 'max' for several puts in parallel will be the same since
read confirmed isolation level makes visible all transactions that finished the commit.
To fix it we wrap it with box.begin/commit and set right isolation level.
Current fix does not resolve that bug in situations when we already are in transaction
since it will open nested transactions.
Further work will be in another PR.
Part of #207