Skip to content

memtx: fix tree iterator next result clarification#7444

Merged
alyapunov merged 1 commit intotarantool:masterfrom
CuriousGeorgiy:gh-7432-fix-iter-next-clarify-after-track-gap
Aug 5, 2022
Merged

memtx: fix tree iterator next result clarification#7444
alyapunov merged 1 commit intotarantool:masterfrom
CuriousGeorgiy:gh-7432-fix-iter-next-clarify-after-track-gap

Conversation

@CuriousGeorgiy
Copy link
Member

The problem is described in #7073. It was fixed only for
tree_iterator_start_raw next method, but other methods used for reverse
iterators are also subject to this bug: move tuple clarification from the
wrapper of iterator next methods to individual iterator methods.

Closes #7432

@CuriousGeorgiy CuriousGeorgiy added bug Something isn't working memtx teamC mvcc labels Jul 20, 2022
@CuriousGeorgiy CuriousGeorgiy self-assigned this Jul 20, 2022
@CuriousGeorgiy CuriousGeorgiy force-pushed the gh-7432-fix-iter-next-clarify-after-track-gap branch from f8428bd to 7577eac Compare July 20, 2022 06:39
@CuriousGeorgiy CuriousGeorgiy force-pushed the gh-7432-fix-iter-next-clarify-after-track-gap branch from 7577eac to a1f21c3 Compare July 20, 2022 07:53
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, but when commit will be in master, this variable will be unused, so don't forget to remove it later. (Or you can move that commit to this PR or even merge PRs)

@drewdzzz drewdzzz assigned CuriousGeorgiy and unassigned drewdzzz Jul 29, 2022
@CuriousGeorgiy
Copy link
Member Author

@drewdzzz what variable?

@drewdzzz
Copy link
Contributor

drewdzzz commented Jul 29, 2022

@CuriousGeorgiy

struct tree_iterator<USE_HINT> *it = \
get_tree_iterator<USE_HINT>(iterator); \

It is used only for tree_iterator_set_current_tuple(it, *ret); after this patch, but commit from another PR removes it.

@CuriousGeorgiy
Copy link
Member Author

@drewdzzz don't worry, build will fail anyways:

/Users/georgiy.lebedev/Work/tarantool/src/box/memtx_tree.cc:609:1: error: unused variable 'it' [-Werror,-Wunused-variable]
WRAP_ITERATOR_METHOD(tree_iterator_next_equal_raw);
^
/Users/georgiy.lebedev/Work/tarantool/src/box/memtx_tree.cc:596:34: note: expanded from macro 'WRAP_ITERATOR_METHOD'
        struct tree_iterator<USE_HINT> *it =                                    \

The problem is described in tarantool#7073. It was fixed only for
`tree_iterator_start_raw` next method, but other methods used for reverse
iterators are also subject to this bug: move tuple clarification from the
wrapper of iterator `next` methods to individual iterator methods.

Closes tarantool#7432

NO_DOC=bugfix
@CuriousGeorgiy CuriousGeorgiy force-pushed the gh-7432-fix-iter-next-clarify-after-track-gap branch from a1f21c3 to d11fc0e Compare August 5, 2022 08:15
@alyapunov alyapunov added the full-ci Enables all tests for a pull request label Aug 5, 2022
@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 84.261% when pulling d11fc0e on CuriousGeorgiy:gh-7432-fix-iter-next-clarify-after-track-gap into 56571d8 on tarantool:master.

@alyapunov alyapunov merged commit 542f952 into tarantool:master Aug 5, 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.

select with reverse iterator in memtx TREE index returns deleted tuple

5 participants