[Tarantool-patches] [PATCH v2 2/6] relay: introduce on_status_update trigger

Serge Petrenko sergepetrenko at tarantool.org
Thu Dec 24 19:11:58 MSK 2020



23.12.2020 20:25, Vladislav Shpilevoy пишет:
> Thanks for the patch!
>
> On 23.12.2020 12:59, Serge Petrenko via Tarantool-patches wrote:
>> The trigger is fired from tx_status_update(), which is the notification
>> for tx that relay's vclock is updated.
>>
>> The trigger will be used to collect synchronous transactions quorum for
>> old leader's transactions.
> I meant the trigger could be global, not in relay. The main point of the
> proposal was not to touch relays almost anyhow. It would make things even
> simpler. I tried to implement it on your branch. See comments in the next
> emails, and 1 comment below, in case my proposal won't work somewhy.

Thanks for the review & for your suggestion!
Sorry I didn't understand your proposal at first. It looks good.
I've split your commit and amended this patch and the patch
"rework clear_synchro_queue".

>> Part of #5435
>> ---
>>   src/box/relay.cc | 12 ++++++++++++
>>   src/box/relay.h  |  4 ++++
>>   2 files changed, 16 insertions(+)
>>
>> diff --git a/src/box/relay.cc b/src/box/relay.cc
>> index e16ac5a6b..dbad8a680 100644
>> --- a/src/box/relay.cc
>> +++ b/src/box/relay.cc
>> @@ -201,6 +209,7 @@ relay_new(struct replica *replica)
>>   	diag_create(&relay->diag);
>>   	stailq_create(&relay->pending_gc);
>>   	relay->state = RELAY_OFF;
>> +	rlist_create(&relay->tx.on_status_update);
> You also need to add trigger_destroy() to relay_stop/relay_delete.
>
>>   	return relay;
>>   }

-- 
Serge Petrenko



More information about the Tarantool-patches mailing list