[Tarantool-patches] [PATCH 8/8] replication: write and read CONFIRM entries
Serge Petrenko
sergepetrenko at tarantool.org
Fri Jun 26 13:58:35 MSK 2020
26.06.2020 01:31, Vladislav Shpilevoy пишет:
> On 26/06/2020 00:04, Vladislav Shpilevoy wrote:
>>> 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?
> Probably not a bug. At least now. Because txn_limbo_read_confirm() is called
> on replica only, where LSN is known from master before it is written to local WAL.
Yes, it's ok for now.
--
Serge Petrenko
More information about the Tarantool-patches
mailing list