[Tarantool-patches] [PATCH 8/8] replication: write and read CONFIRM entries

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Fri Jun 26 01:04:13 MSK 2020


> diff --git a/src/box/txn_limbo.c b/src/box/txn_limbo.c
> index efb97a591..daec98317 100644
> --- a/src/box/txn_limbo.c
> +++ b/src/box/txn_limbo.c
> @@ -128,12 +128,65 @@ txn_limbo_wait_complete(struct txn_limbo *limbo, struct txn_limbo_entry *entry)
> +void
> +txn_limbo_read_confirm(struct txn_limbo *limbo, int64_t lsn)
> +{
> +	assert(limbo->instance_id != REPLICA_ID_NIL &&
> +	       limbo->instance_id != instance_id);
> +	struct txn_limbo_entry *e, *tmp;
> +	rlist_foreach_entry_safe(e, &limbo->queue, in_queue, tmp) {
> +		if (e->lsn > lsn)
> +			break;

What if e->lsn is -1, because its LSN wasn't delivered to TX thread
from WAL thread yet?


More information about the Tarantool-patches mailing list