[tarantool-patches] Re: [PATCH 05/10] Get rid of fiber_gc from txn_rollback

Konstantin Osipov kostja.osipov at gmail.com
Wed Apr 24 22:12:09 MSK 2019


* Georgy Kirichenko <georgy at tarantool.org> [19/04/19 19:59]:

The patch is LGTM, please see one comment below.

> index fabb4bb48..1f6b30f4a 100644
> --- a/src/box/vy_scheduler.c
> +++ b/src/box/vy_scheduler.c
> @@ -889,8 +889,10 @@ vy_deferred_delete_batch_process_f(struct cmsg *cmsg)
>  	for (int i = 0; i < batch->count; i++) {
>  		if (vy_deferred_delete_process_one(deferred_delete_space,
>  						   pk->space_id, pk->mem_format,
> -						   &batch->stmt[i]) != 0)
> +						   &batch->stmt[i]) != 0) {
> +			txn_rollback(txn);
>  			goto fail;
> +		}
>  	}
>  

I would add a new label, fail_rollback, this would be more with
vinyl style.

>  	if (txn_commit(txn) != 0)
> @@ -900,7 +902,7 @@ vy_deferred_delete_batch_process_f(struct cmsg *cmsg)
>  fail:
>  	batch->is_failed = true;
>  	diag_move(diag_get(), &batch->diag);
> -	txn_rollback();
> +	fiber_gc();
>  }
>  

-- 
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.io - www.twitter.com/kostja_osipov




More information about the Tarantool-patches mailing list