Skip to content

memtx: fix self-conflicting of transactions#7236

Merged
alyapunov merged 3 commits intotarantool:masterfrom
CuriousGeorgiy:fix-fullscan-tracking
Jun 22, 2022
Merged

memtx: fix self-conflicting of transactions#7236
alyapunov merged 3 commits intotarantool:masterfrom
CuriousGeorgiy:fix-fullscan-tracking

Conversation

@CuriousGeorgiy
Copy link
Member

@CuriousGeorgiy CuriousGeorgiy commented Jun 6, 2022

memtx: fix DML causing transaction self-conflict after full scan in HASH

When full scans are checked on writes, we must only conflict transactions
other than the one that did the full scan.

Closes #7221

memtx: fix DML causing transaction self-conflict after selecting same key

On insertion, when point holes are checked on insertion, we must only
conflict transactions other than the one that read the hole.

NO_CHANGELOG=internal bugfix
NO_DOC=bugfix

Closes #7234
Closes #7235

memtx: add assertions for self-conflicting of transactions

We assume that a transaction cannot conflict itself and that only a
non-prepared transaction can be conflicted: track these assumptions with
appropriate assertions.

@CuriousGeorgiy CuriousGeorgiy added bug Something isn't working memtx teamC mvcc labels Jun 6, 2022
@CuriousGeorgiy CuriousGeorgiy changed the title Fix self-conflicting of transactions memtx: fix self-conflicting of transactions Jun 6, 2022
@CuriousGeorgiy CuriousGeorgiy force-pushed the fix-fullscan-tracking branch from a5d9eb7 to d78be38 Compare June 6, 2022 09:42
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.

It's all good except for one thing: it's better to write a changelog, at least one for the entire patch, because you changed the behavior of the transaction manager.

@drewdzzz drewdzzz assigned CuriousGeorgiy and unassigned drewdzzz Jun 7, 2022
@CuriousGeorgiy
Copy link
Member Author

@drewdzzz these changes cannot be observed by users.

When full scans are checked on writes, we must only conflict transactions
other than the one that did the full scan.

NO_CHANGELOG=internal bugfix
NO_DOC=bugfix

Closes tarantool#7221
@CuriousGeorgiy CuriousGeorgiy force-pushed the fix-fullscan-tracking branch from d78be38 to 8273bf0 Compare June 7, 2022 14:28
@CuriousGeorgiy CuriousGeorgiy removed their assignment Jun 8, 2022
@@ -1499,7 +1499,8 @@ check_hole(struct space *space, uint32_t index,

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please make the title of the commit a bit shorter? It is shown very strange in Web (an I bet somewhere else).

Copy link
Member Author

@CuriousGeorgiy CuriousGeorgiy Jun 10, 2022

Choose a reason for hiding this comment

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

Fixed: shortened the commit subject.

@locker seems like the same bug in checkpatch (tarantool/checkpatch#18).

@alyapunov alyapunov added the full-ci Enables all tests for a pull request label Jun 9, 2022
@coveralls
Copy link

coveralls commented Jun 9, 2022

Coverage Status

Coverage decreased (-0.03%) to 84.826% when pulling a0e36f5 on CuriousGeorgiy:fix-fullscan-tracking into ede831d on tarantool:master.

On insertion, when point holes are checked on insertion, we must only
conflict transactions other than the one that read the hole.

NO_CHANGELOG=internal bugfix
NO_DOC=bugfix

Closes tarantool#7234
Closes tarantool#7235
We assume that a transaction cannot conflict itself and that only a
non-prepared transaction can be conflicted: track these assumptions with
appropriate assertions.

NO_CHANGELOG=internal assertions
NO_DOC=internal assertions
NO_TEST=internal assertions
@CuriousGeorgiy CuriousGeorgiy force-pushed the fix-fullscan-tracking branch from 8273bf0 to a0e36f5 Compare June 10, 2022 11:33
@alyapunov alyapunov merged commit 058fcd5 into tarantool:master Jun 22, 2022
@locker
Copy link
Member

locker commented Jun 22, 2022

Cherry-picked to 2.10.

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

5 participants