From e6f5090ce76c089dde13b297561b2187c26c8746 Mon Sep 17 00:00:00 2001 From: Aleksandr Lyapunov <alyapunov@tarantool.org> Date: Tue, 13 Dec 2022 15:13:34 +0300 Subject: [PATCH] memtx: don't set unnecessary conflict If a transaction writes to a gap that is tracked by some another transaction, the interval must be (usually) broken into parts, while new story must be explicitly added to the read set of reading transaction. Now both read tracker and conflict trackers are set in this case. But read tracker is enough in this case - when the writing tx is prepared it will conflict reading transaction, that's all we need. Let's leave only read tracker. Part of #8122 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring --- src/box/memtx_tx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/box/memtx_tx.c b/src/box/memtx_tx.c index e4144d44d2..5825f31a69 100644 --- a/src/box/memtx_tx.c +++ b/src/box/memtx_tx.c @@ -2097,8 +2097,7 @@ memtx_tx_handle_gap_write(struct txn *txn, struct space *space, uint64_t index_mask = 1ull << (ind & 63); rlist_foreach_entry_safe(fsc_item, fsc_list, in_full_scans, fsc_tmp) { if (fsc_item->txn != txn && - (memtx_tx_cause_conflict(txn, fsc_item->txn) != 0 || - memtx_tx_track_read_story(fsc_item->txn, space, story, + (memtx_tx_track_read_story(fsc_item->txn, space, story, index_mask) != 0)) return -1; } -- GitLab