Skip to content

memtx: fix handling of corner cases gap tracking in transaction manager#7395

Merged
alyapunov merged 2 commits intotarantool:masterfrom
CuriousGeorgiy:gh-7375-fix-gap-tracking-corner-cases
Aug 5, 2022
Merged

memtx: fix handling of corner cases gap tracking in transaction manager#7395
alyapunov merged 2 commits intotarantool:masterfrom
CuriousGeorgiy:gh-7375-fix-gap-tracking-corner-cases

Conversation

@CuriousGeorgiy
Copy link
Member

Gap tracking does not handle gap writes when the key has the same value as
the gap item: review the whole gap write handling process, refactor it and
fix handling of corner cases along the way.

Closes #7375

@CuriousGeorgiy CuriousGeorgiy self-assigned this Jul 12, 2022
@CuriousGeorgiy CuriousGeorgiy force-pushed the gh-7375-fix-gap-tracking-corner-cases branch 3 times, most recently from 5a49c94 to 4bc1a13 Compare July 12, 2022 11:50
@CuriousGeorgiy CuriousGeorgiy requested review from Korablev77, alyapunov and drewdzzz and removed request for alyapunov July 12, 2022 11:50
@CuriousGeorgiy CuriousGeorgiy force-pushed the gh-7375-fix-gap-tracking-corner-cases branch from 4bc1a13 to 098aeab Compare July 13, 2022 05:03
((dir < 0 && cmp > 0) ||
(cmp > 0 && item->type == ITER_EQ) ||
(cmp == 0 && ((dir < 0 && is_full_key) ||
item->type == ITER_LT)));
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems to be impossible to understand without any explanations :(

Copy link
Member Author

Choose a reason for hiding this comment

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

Neither did the existing code... Do you have any ideas on how to make it clear what's going on?

@CuriousGeorgiy CuriousGeorgiy force-pushed the gh-7375-fix-gap-tracking-corner-cases branch from 098aeab to 4063d01 Compare July 25, 2022 06:33
@drewdzzz drewdzzz assigned CuriousGeorgiy and unassigned drewdzzz Jul 29, 2022
@CuriousGeorgiy CuriousGeorgiy requested a review from drewdzzz July 29, 2022 07:56
@CuriousGeorgiy CuriousGeorgiy force-pushed the gh-7375-fix-gap-tracking-corner-cases branch from 4063d01 to 6b1d227 Compare July 29, 2022 07:56
@drewdzzz drewdzzz self-requested a review July 29, 2022 08:02
@drewdzzz drewdzzz assigned CuriousGeorgiy and unassigned drewdzzz Jul 29, 2022
@CuriousGeorgiy CuriousGeorgiy force-pushed the gh-7375-fix-gap-tracking-corner-cases branch from 6b1d227 to d6a5cf4 Compare July 29, 2022 08:05
Since `ITER_ALL` is an alias to `ITER_GE` in context of TREE index,
denormalize it during iterator creation.

Needed for tarantool#7375

NO_CHANGELOG=refactoring
NO_DOC=refactoring
NO_TEST=refactoring
Gap tracking does not handle gap writes when the key has the same value as
the gap item: review the whole gap write handling logic, refactor it and
fix handling of corner cases along the way.

Co-authored-by: Alexander Lyapunov <alyapunov@tarantool.org>

Closes tarantool#7375

NO_DOC=bugfix
@CuriousGeorgiy CuriousGeorgiy force-pushed the gh-7375-fix-gap-tracking-corner-cases branch from d6a5cf4 to 9592619 Compare July 29, 2022 08:12
@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.04%) to 84.283% when pulling 9592619 on CuriousGeorgiy:gh-7375-fix-gap-tracking-corner-cases into 969b76a on tarantool:master.

@alyapunov alyapunov requested review from drewdzzz and removed request for drewdzzz August 5, 2022 13:44
@alyapunov alyapunov dismissed drewdzzz’s stale review August 5, 2022 13:46

Skipped because of vacation.

@alyapunov alyapunov merged commit 7360281 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 complicated full-ci Enables all tests for a pull request memtx mvcc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gap tracking corner case works incorrectly

5 participants