[Tarantool-patches] [PATCH 1/2] txn: single failure point for WAL and TX commit errors
Cyrill Gorcunov
gorcunov at gmail.com
Tue Jul 21 11:42:19 MSK 2020
On Mon, Jul 20, 2020 at 10:43:05PM +0200, Vladislav Shpilevoy wrote:
> Txn_commit() uses journal_write() function to send requests to WAL
> thread. journal_write() can return 0/-1, but these codes have
> nothing to do with the actual write result. journal_write() only
> signals whether the interaction with WAL thread finished
> successfully. It tells nothing about what happened in this
> interaction.
>
> To check WAL write result need to look at journal_entry.res field.
> As a result, there were 2 failure points to handle. One of them
> wasn't handled for synchronous transactions. Not counting 4
> failure points in other places:
>
> - When can't prepare the transaction before commit;
> - When can't allocate a journal entry;
> - When can't append a new entry to the qsync limbo;
> - When synchronous transaction completion wait fails.
>
> This patch merges all the failure points into one place for
> txn_commit().
>
> Closes #5146
Acked-by: Cyrill Gorcunov <gorcunov at gmail.com>
More information about the Tarantool-patches
mailing list