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

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Wed Dec 23 20:25:44 MSK 2020


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.

> 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;
>  }


More information about the Tarantool-patches mailing list