[Tarantool-patches] [PATCH v4 06/12] box: write PROMOTE even for empty limbo

Serge Petrenko sergepetrenko at tarantool.org
Mon Apr 19 16:39:36 MSK 2021



16.04.2021 19:25, Serge Petrenko пишет:
> PROMOTE entry will be used to mark limbo ownership transition besides
> emptying the limbo. So it has to be written every time
> `box.ctl.clear_synchro_queue()` succeeds. Even when the limbo was
> already empty.
>
> Part of #5445
>
Follow-up fixes:

==========================

diff --git a/src/box/txn_limbo.c b/src/box/txn_limbo.c
index 0d2d274f6..8b5c76f28 100644
--- a/src/box/txn_limbo.c
+++ b/src/box/txn_limbo.c
@@ -643,7 +643,13 @@ complete:
  void
  txn_limbo_process(struct txn_limbo *limbo, const struct 
synchro_request *req)
  {
-       if (req->replica_id != limbo->owner_id) {
+       if (req->replica_id == REPLICA_ID_NIL) {
+               /*
+                * The limbo was empty on the instance issuing the request.
+                * This means this instance must empty its limbo as well.
+                */
+               assert(req->lsn == 0 && req->type == IPROTO_PROMOTE);
+       } else if (req->replica_id != limbo->owner_id) {
                 /*
                  * Ignore CONFIRM/ROLLBACK messages for a foreign master.
                  * These are most likely outdated messages for already 
confirmed

-- 
Serge Petrenko



More information about the Tarantool-patches mailing list