[Tarantool-patches] [PATCH 2/8] replication: introduce replication_sync_quorum cfg

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Thu Jun 11 02:51:06 MSK 2020


Thanks for the review fixes!

I applied the new error message, and updated a comment for the
option declaration.

> commit 1e5fcbe66c23b5371f0422c425c7f19ffecae83b
> Author: Serge Petrenko <sergepetrenko at tarantool.org>
> Date:   Wed Jun 10 13:42:16 2020 +0300
> 
>     follow-up fixes
> 
> diff --git a/src/box/box.cc b/src/box/box.cc
> index 9b67aeb1f..27be7a7b1 100644
> --- a/src/box/box.cc
> +++ b/src/box/box.cc
> @@ -481,9 +481,9 @@ box_check_replication_sync_quorum(void)
>  {
>  	int quorum = cfg_geti("replication_sync_quorum");
>  	if (quorum <= 0 || quorum > VCLOCK_MAX) {
> -		diag_set(ClientError, ER_CFG, "replication_sync_quorum",
> -			 "the value must be greater than and less than "
> -			 "maximal number of replicas");
> +		tnt_raise(ClientError, ER_CFG, "replication_sync_quorum",
> +			  "the value must be greater than zero and less "
> +			  "than maximal number of replicas");

However I kept diag_set instead of tnt_raise. Because I hope this
file will become more C gradually. This is why you can already see
some box_check_*() functions returning -1 instead of throwing an
error.

>  		return -1;
>  	}
>  	return quorum;


More information about the Tarantool-patches mailing list