[Tarantool-patches] [PATCH] replication: stop pushing TimedOut error to the replica

Cyrill Gorcunov gorcunov at gmail.com
Fri Jul 9 10:59:39 MSK 2021


On Fri, Jul 09, 2021 at 10:40:48AM +0300, Serge Petrenko wrote:
> @@ -549,6 +550,12 @@ iproto_write_error(int fd, const struct error *e, uint32_t schema_version,
>  
>  	size_t region_svp = region_used(region);
>  	mpstream_iproto_encode_error(&stream, e);
> +	struct errinj *inj = errinj(ERRINJ_IPROTO_WRITE_ERROR_LARGE,
> +				    ERRINJ_INT);
> +	if (inj != NULL && inj->iparam > 0) {
> +		char garbage[inj->iparam];

Serge, I didn't read the patch yet but this moment is very dubious.
While standart allows to allocate dynamic stack here it may lead
to unpredicted effects. I would suggest to use malloc if this
won't cause significant rework, hm? Surely this can be done on
top of the patch (actually you did a huge amount of great work
investigating this issue, thanks!!!)


More information about the Tarantool-patches mailing list