• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tarantool / tarantool / 16525482167

25 Jul 2025 03:18PM UTC coverage: 87.609% (+0.03%) from 87.582%
16525482167

push

github

sergepetrenko
journal: check present of prev_entry in the queue

On cascading rollback it is necessary to rollback in a reversed
order all the entries, ending with the one, which caused the
rollback.

The entries in the journal space-waiting queue are linked using
stailq. So cutting the tail of it to roll it back is not so
simple. Need to know the previous entry so as to cut all the next
ones.

The previous entry is saved before a next entry is added to the
queue. So on a rollback the previous entry is already known.

But it might happen, that by the time a rollback starts, the
previous entry is already gone. For example, it got enough space
and went to WAL, removing itself from the journal space-waiting
queue.

Then such an entry becomes not usable. It is at least for sure is
not in the list anymore. And might even be freed already.

Luckily, it is easy to check if the prev entry is valid. Lets do
that. When the prev entry is gone, it can only be possible when
the current entry became the first one. Then can just rollback
the entire queue.

Closes #11712
Part of #11180

NO_DOC=bugfix
NO_CHANGELOG=was not released

70793 of 124625 branches covered (56.8%)

5 of 5 new or added lines in 1 file covered. (100.0%)

18 existing lines in 8 files now uncovered.

104044 of 118759 relevant lines covered (87.61%)

1385323.56 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

90.38
/src/lib/core/trigger.cc


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc