[tarantool-patches] Re: [PATCH v2 4/5] Emit NOP if an applier skips row

Konstantin Osipov kostja at tarantool.org
Fri Feb 8 19:50:40 MSK 2019


* Georgy Kirichenko <georgy at tarantool.org> [19/01/22 15:45]:
>  				 */
> -				if (e->type == &type_ClientError &&
> -				    box_error_code(e) == ER_TUPLE_FOUND &&
> -				    replication_skip_conflict)
> -					diag_clear(diag_get());
> -				else {
> -					/* Rollback lsn to have a chance for a retry. */
> -					vclock_set(&replicaset.applier.vclock,
> -						   row.replica_id, old_lsn);
> -					latch_unlock(latch);
> -					diag_raise();
> -				}
> +				diag_clear(diag_get());
> +				row.type = IPROTO_NOP;
> +				row.bodycnt = 0;
> +				res = xstream_write(applier->subscribe_stream,
> +						    &row);
> +			}
> +			if (res != 0) {
> +				/* Rollback lsn to have a chance for a retry. */
> +				vclock_set(&replicaset.applier.vclock,
> +					   row.replica_id, old_lsn);
> +				latch_unlock(latch);
> +				diag_raise();
>  			}

Why do you need to manually promote applier.vclock here?


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