Skip to content

memtx: add transaction management support for multikey indexes#8465

Open
CuriousGeorgiy wants to merge 4 commits intotarantool:masterfrom
CuriousGeorgiy:gh-6835-memtx-mk-index-txm-support
Open

memtx: add transaction management support for multikey indexes#8465
CuriousGeorgiy wants to merge 4 commits intotarantool:masterfrom
CuriousGeorgiy:gh-6835-memtx-mk-index-txm-support

Conversation

@CuriousGeorgiy
Copy link
Member

Closes #6385

@CuriousGeorgiy CuriousGeorgiy force-pushed the gh-6835-memtx-mk-index-txm-support branch 3 times, most recently from c5f3e1a to c4bc058 Compare March 19, 2023 12:27
@github-advanced-security
Copy link

You have successfully added a new CodeQL configuration /language:cpp. As part of the setup process, we have scanned this repository and found 21 existing alerts. Please check the repository Security tab to see all alerts.

@CuriousGeorgiy CuriousGeorgiy force-pushed the gh-6835-memtx-mk-index-txm-support branch 2 times, most recently from 9061d98 to 1129bb9 Compare March 20, 2023 09:09
@coveralls
Copy link

coveralls commented Mar 20, 2023

Coverage Status

Coverage: 85.693% (+0.04%) from 85.652% when pulling ffe9c4f on CuriousGeorgiy:gh-6835-memtx-mk-index-txm-support into f05e683
on tarantool:master
.

@CuriousGeorgiy CuriousGeorgiy force-pushed the gh-6835-memtx-mk-index-txm-support branch 3 times, most recently from e703cf1 to 7d122c7 Compare March 20, 2023 16:27
@CuriousGeorgiy CuriousGeorgiy marked this pull request as ready for review March 20, 2023 16:28
@CuriousGeorgiy
Copy link
Member Author

Ignoring following lint/checkpatch errors:

  • FUNCTION_ARGUMENTS — the function arguments originally had no names;
  • UNCOMMENTED_DEFINITION — the functions originally had no comments;
  • CODE_IDENT — not FP, caused by transaction manager comments, but I can't really do anyhting about it.

@CuriousGeorgiy CuriousGeorgiy force-pushed the gh-6835-memtx-mk-index-txm-support branch 4 times, most recently from 70f8c60 to 7141e4e Compare March 21, 2023 08:22
@CuriousGeorgiy CuriousGeorgiy force-pushed the gh-6835-memtx-mk-index-txm-support branch 2 times, most recently from cafcf1b to 4114df1 Compare March 23, 2023 11:47
@CuriousGeorgiy CuriousGeorgiy requested a review from locker March 23, 2023 11:48
Currently, transaction management of space replace is decoupled index
replaces: this is not convenient, since we may need to retrieve additional
meta information from certain indexes (e.g., successor tuple from tree
index or results of individual replace operations for multikey index) — in
order to achieve this, couple transaction management with index replaces.

Needed for tarantool#6385

NO_CHANGELOG=refactoring
NO_DOC=refactoring
NO_TEST=refactoring
Currently, replace in multikey index is done via a replace function
specialization for tree index: not only is it excessive (because
it unnecessarily couples multikey replace with index replace), but it also
doesn't allow for proper transaction manager notification of replace event,
since all the meta-information is lost — refactor multikey index replace as
a sequence of regular replace operations, which potentially allows for
implementing multikey on top any type of index, not limiting it to tree.

Needed for tarantool#6385

NO_CHANGELOG=refactoring
NO_DOC=refactoring
NO_TEST=refactoring
Multikey index tuple hashing is needed for memtx transaction manager
support of multikey indexes: enable multikey hashing by simply adding a
loop iterating over the multikey indices of a multikey key definition.

Needed for tarantool#6385

NO_CHANGELOG=refactoring
NO_DOC=refactoring
NO_TEST=refactoring
Multikey indexes require separate history chains for each of the keys: this
is required for tuple clarification as well as for gap tracking. In order
to achieve this, we add another layer of indirection via a key array for
each story: history chains are now formed by keys rather than stories.

Closes tarantool#6385

NO_DOC=<the documentation doesn't mention that multikey indexes are not
        supported by memtx MVCC transaction manager>
@CuriousGeorgiy CuriousGeorgiy force-pushed the gh-6835-memtx-mk-index-txm-support branch from 4114df1 to ffe9c4f Compare March 23, 2023 11:55
@CuriousGeorgiy
Copy link
Member Author

@locker this linter/checkpatch error looks FP:

ERROR:CODE_IDENT: code indent should match comment
#2266: FILE: src/box/memtx_tx.c:2536:
+		 */
+	}

@CuriousGeorgiy CuriousGeorgiy removed their assignment Mar 23, 2023
@locker locker removed their assignment May 3, 2023
@locker locker removed their request for review May 3, 2023 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add memtx MVCC transaction manager support for multikey indexes

5 participants