Skip to content

Commit

Permalink
memtx: drop memtx_tx_track_read_story_slow
Browse files Browse the repository at this point in the history
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 tarantool#8648
Part of tarantool#8654

NO_DOC=refactoring
NO_TEST=refactoring
NO_CHANGELOG=refactoring
  • Loading branch information
alyapunov committed May 17, 2023
1 parent e3272c7 commit ffda510
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions src/box/memtx_tx.c
Expand Up @@ -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;

Expand Down Expand Up @@ -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.
*
Expand Down

0 comments on commit ffda510

Please sign in to comment.