[Tarantool-patches] [PATCH 5/8] txn_limbo: follow-up fixes

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Thu Jun 11 16:01:14 MSK 2020


>> On 09/06/2020 14:20, Serge Petrenko wrote:
>>> Part-of #4847
>>> Follow-up #4844
>>> Follow-up #4845
>>> ---
>>>   src/box/txn.c       | 5 +++--
>>>   src/box/txn_limbo.c | 2 +-
>>>   2 files changed, 4 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/src/box/txn.c b/src/box/txn.c
>>> index 1d6518e29..f30e20944 100644
>>> --- a/src/box/txn.c
>>> +++ b/src/box/txn.c
>>> @@ -459,7 +459,7 @@ txn_complete(struct txn *txn)
>>>            * back to the fiber, owning the transaction so as
>>>            * it could decide what to do next.
>>>            */
>>> -        if (txn->fiber != fiber())
>>> +        if (txn->fiber != NULL && txn->fiber != fiber())
>>>               fiber_wakeup(txn->fiber);
>> Does it crash if you wakeup self? I thought it was fine, since
>> the self fiber already contains FIBER_IS_READY (doesn't it?).
> 
> 
> No. But you're waking up txn->fiber,  which  may be NULL.
> Hence I added the check.

Yeah, my bad. I somewhy thought you added the self check, and the NULL
check was there before.


More information about the Tarantool-patches mailing list