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

tarantool / tarantool / 28157651138

25 Jun 2026 08:36AM UTC coverage: 87.682% (-0.002%) from 87.684%
28157651138

push

github

sergepetrenko
applier: don't send a stale ACK on fiber cancellation

Before the patch the applier writer fiber waited for an ACK request on
`writer_cond` and, as soon as `fiber_cond_wait_timeout()` returned, sent
the next ACK without checking why it woke up.

The wait can also return because the fiber was cancelled. In that case
we shouldn't send one last ACK: `coio_write_xrow()` may not yield if the
socket is writable right away, so a stale ACK could slip out before the
fiber stops. Let's check for fiber cancellation after the wait and break
out instead.

Whenever `writer_cond` is signalled `has_acks_to_send` is set to true.
Let's add that assertion in order not to break it one more time, it can
lead to nasty bugs. Though, the assertion only makes sense for peers >=
1.7.7 (where the wait is infinite), old versions wake up on timeout and
don't have `has_acks_to_send` set.

Follows up #12795

NO_DOC=internal
NO_TEST=can't provoke the cancellation race from Lua, hardening only
NO_CHANGELOG=hardening, not a user-visible bug

70846 of 119104 branches covered (59.48%)

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

130 existing lines in 17 files now uncovered.

106506 of 121469 relevant lines covered (87.68%)

1354989.47 hits per line

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

96.15
/src/box/lua/init.c


Source Not Available

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

© 2026 Coveralls, Inc