Skip to content

memtx: fix HASH index 'GT' iterator next method set incorrectly#7488

Merged
alyapunov merged 1 commit intotarantool:masterfrom
CuriousGeorgiy:gh-7477-memtx-hash-idx-gt-iter-dirty-reads
Aug 4, 2022
Merged

memtx: fix HASH index 'GT' iterator next method set incorrectly#7488
alyapunov merged 1 commit intotarantool:masterfrom
CuriousGeorgiy:gh-7477-memtx-hash-idx-gt-iter-dirty-reads

Conversation

@CuriousGeorgiy
Copy link
Member

The next method of memtx HASH index 'GT' iterator is initially set to
'GT' and is supposed to be set to 'GE' after first iteration: it is
mistakenly set to the 'base' method instead of the full method which also
does tuple clarification — this allows dirty reads. Move the next method
change on first iteration to WRAP_ITERATOR_METHOD for clarity and
correctness.

Closes #7477

@CuriousGeorgiy CuriousGeorgiy added bug Something isn't working memtx teamC mvcc labels Jul 28, 2022
@CuriousGeorgiy CuriousGeorgiy self-assigned this Jul 28, 2022
@CuriousGeorgiy CuriousGeorgiy force-pushed the gh-7477-memtx-hash-idx-gt-iter-dirty-reads branch from affea67 to c8af8e9 Compare July 28, 2022 05:26
The `next` method of memtx HASH index 'GT' iterator is initially set to
'GT' and is supposed to be set to 'GE' after first iteration: it is
mistakenly set to the 'base' method instead of the full method which also
does tuple clarification — this allows dirty reads. Move the `next` method
change on first iteration to `WRAP_ITERATOR_METHOD` for clarity and
correctness.

Closes tarantool#7477

NO_DOC=bugfix
@CuriousGeorgiy CuriousGeorgiy force-pushed the gh-7477-memtx-hash-idx-gt-iter-dirty-reads branch from c8af8e9 to 162923b Compare July 28, 2022 05:28
Copy link
Contributor

@drewdzzz drewdzzz left a comment

Choose a reason for hiding this comment

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

LGTM

@drewdzzz drewdzzz removed their assignment Jul 28, 2022
@alyapunov alyapunov added the full-ci Enables all tests for a pull request label Aug 4, 2022
@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 84.263% when pulling 162923b on CuriousGeorgiy:gh-7477-memtx-hash-idx-gt-iter-dirty-reads into 969b76a on tarantool:master.

@alyapunov alyapunov merged commit 5c0d711 into tarantool:master Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working full-ci Enables all tests for a pull request memtx mvcc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

memtx HASH index 'GT' iterator dirty reads

5 participants