From ffda51055de3fdcd9f7e40e247651e6a16a9c472 Mon Sep 17 00:00:00 2001 From: Aleksandr Lyapunov Date: Sun, 19 Feb 2023 18:01:49 +0300 Subject: [PATCH] memtx: drop memtx_tx_track_read_story_slow The only place where this static function is used is more general static function - memtx_tx_track_read_story. This is a bit confusing - usually slow variant stand for public inline 'fast' method. So merge both functions in one. Part of #8648 Part of #8654 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring --- src/box/memtx_tx.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/src/box/memtx_tx.c b/src/box/memtx_tx.c index adc5c4c08535..62f9afcbfc18 100644 --- a/src/box/memtx_tx.c +++ b/src/box/memtx_tx.c @@ -2663,9 +2663,16 @@ tx_read_tracker_new(struct txn *reader, struct memtx_story *story, } static void -memtx_tx_track_read_story_slow(struct txn *txn, struct memtx_story *story, - uint64_t index_mask) +memtx_tx_track_read_story(struct txn *txn, struct space *space, + struct memtx_story *story, uint64_t index_mask) { + if (txn == NULL) + return; + if (space == NULL) + return; + if (space->def->opts.is_ephemeral) + return; + (void)space; assert(story != NULL); struct tx_read_tracker *tracker = NULL; @@ -2698,19 +2705,6 @@ memtx_tx_track_read_story_slow(struct txn *txn, struct memtx_story *story, rlist_add(&txn->read_set, &tracker->in_read_set); } -static void -memtx_tx_track_read_story(struct txn *txn, struct space *space, - struct memtx_story *story, uint64_t index_mask) -{ - if (txn == NULL) - return; - if (space == NULL) - return; - if (space->def->opts.is_ephemeral) - return; - memtx_tx_track_read_story_slow(txn, story, index_mask); -} - /** * Record in TX manager that a transaction @txn have read a @tuple in @space. *