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

Serge Petrenko sergepetrenko at tarantool.org
Thu Jun 11 11:46:38 MSK 2020


11.06.2020 02:51, Vladislav Shpilevoy пишет:
> Thanks for the fixes!

Thanks for  the answer!


>
> 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.

-- 
Serge Petrenko



More information about the Tarantool-patches mailing list