Skip to content

mvcc: fix reverse tree iterators gap tracking#7077

Merged
alyapunov merged 1 commit intotarantool:masterfrom
CuriousGeorgiy:gh-7073-clarify-on-tuple-with-gc-story
May 19, 2022
Merged

mvcc: fix reverse tree iterators gap tracking#7077
alyapunov merged 1 commit intotarantool:masterfrom
CuriousGeorgiy:gh-7073-clarify-on-tuple-with-gc-story

Conversation

@CuriousGeorgiy
Copy link
Member

@CuriousGeorgiy CuriousGeorgiy commented Apr 25, 2022

Apparently, the current implementation of tree_iterator_start_raw is
buggy for reverse iterators: instead of tracking gaps for successors of
keys, it tracks gaps for tuples shifted by one to the left of the
successor: reorder the code of tree_iterator_start_raw to get
the successor tuple prior to shifting done for reverse iterators and
simplify the implementation to make it more straightforward and thus
comprehensible.

Closes #7073
Closes #7113

Copy link
Contributor

@alyapunov alyapunov left a comment

Choose a reason for hiding this comment

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

Waiting for test, and I should recheck that the code is correct in all cases..

@alyapunov alyapunov assigned CuriousGeorgiy and unassigned alyapunov May 4, 2022
@CuriousGeorgiy CuriousGeorgiy force-pushed the gh-7073-clarify-on-tuple-with-gc-story branch 3 times, most recently from 91f25bb to 4c52bb2 Compare May 5, 2022 15:15
@CuriousGeorgiy CuriousGeorgiy changed the title mvcc: fix order of tuple clarification and tracking mvcc: fix reverse tree iterators gap tracking May 5, 2022
@CuriousGeorgiy CuriousGeorgiy changed the title mvcc: fix reverse tree iterators gap tracking box: fix reverse tree iterators gap tracking May 5, 2022
@CuriousGeorgiy CuriousGeorgiy changed the title box: fix reverse tree iterators gap tracking mvcc: fix reverse tree iterators gap tracking May 5, 2022
@CuriousGeorgiy CuriousGeorgiy requested a review from drewdzzz May 5, 2022 15:30
@drewdzzz drewdzzz assigned CuriousGeorgiy and unassigned alyapunov and drewdzzz May 12, 2022
@CuriousGeorgiy CuriousGeorgiy force-pushed the gh-7073-clarify-on-tuple-with-gc-story branch from 4c52bb2 to 57302fd Compare May 13, 2022 13:54
@CuriousGeorgiy CuriousGeorgiy requested a review from drewdzzz May 13, 2022 14:49
@alyapunov alyapunov added the full-ci Enables all tests for a pull request label May 18, 2022
@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 84.915% when pulling 57302fd on CuriousGeorgiy:gh-7073-clarify-on-tuple-with-gc-story into 12cf998 on tarantool:master.

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.

That's OK, but the code will change after you fix the other reviewer's remarks. Then request the review again, please.

@drewdzzz drewdzzz removed their assignment May 18, 2022
Apparently, the current implementation of `tree_iterator_start_raw` is
buggy for reverse iterators: instead of tracking gaps for successors of
keys, it tracks gaps for tuples shifted by one to the left of the
successor: reorder the code of `tree_iterator_start_raw` to get
the successor tuple prior to shifting done for reverse iterators and
simplify the implementation to make it more straightforward and thus
comprehensible.

Closes tarantool#7073
Closes tarantool#7113

NO_DOC=bugfix

Co-authored-by: Alexander Lyapunov <alyapunov@tarantool.org>
@CuriousGeorgiy CuriousGeorgiy force-pushed the gh-7073-clarify-on-tuple-with-gc-story branch from 57302fd to 9fd389a Compare May 19, 2022 05:26
@drewdzzz drewdzzz assigned alyapunov and unassigned alyapunov and drewdzzz May 19, 2022
@alyapunov alyapunov merged commit 0751619 into tarantool:master May 19, 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.

Reverse tree iterators gap tracking bug memtx_tx_tuple_clarify on tuple which story was previously garbage collected

4 participants