[Tarantool-patches] [PATCH 1/1] qsync: remove polling from box_promote()
Serge Petrenko
sergepetrenko at tarantool.org
Tue Jul 13 13:02:17 MSK 2021
13.07.2021 01:20, Vladislav Shpilevoy пишет:
> box_promote() when called manually used to wait for the existing
> transactions from a foreign limbo to end during a timeout. Giving
> them a chance to end on their terms.
>
> The waiting was done via polling like
>
> while (!done)
> sleep(small_timeout);
>
> Polling is almost always super bad both for execution time and
> for CPU usage. The patch replaces it with proper waiting based on
> events happening in the limbo.
>
> Closes #5190
> ---
> Branch: http://github.com/tarantool/tarantool/tree/gerold103/gh-5190-qsync-polling
> Issue: https://github.com/tarantool/tarantool/issues/5190
>
> src/box/box.cc | 7 +----
> src/box/txn_limbo.c | 74 ++++++++++++++++++++++++++++++++++-----------
> src/box/txn_limbo.h | 4 +++
> 3 files changed, 62 insertions(+), 23 deletions(-)
>
Hi! Thanks for the fix! LGTM.
--
Serge Petrenko
More information about the Tarantool-patches
mailing list