From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: Leonid Vasiliev <lvasiliev@tarantool.org>,
gorcunov@gmail.com, sergepetrenko@tarantool.org
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH] replication: add support of qsync to the snapshot machinery
Date: Tue, 16 Jun 2020 01:05:47 +0200 [thread overview]
Message-ID: <9d1ccba6-744c-2a2c-f06b-aec89440a58c@tarantool.org> (raw)
In-Reply-To: <c12d6cdef83360ab3dfea08d9928a39941b54696.1591799464.git.lvasiliev@tarantool.org>
I appended a new commit on top of this one on the
branch:
====================
replication: use replication_synchro_timeout for snaps
[TO BE SQUASHED INTO THE PREVIOUS COMMIT]
diff --git a/src/box/gc.c b/src/box/gc.c
index fb7b37a2e..9b7c510f6 100644
--- a/src/box/gc.c
+++ b/src/box/gc.c
@@ -68,9 +68,6 @@ gc_cleanup_fiber_f(va_list);
static int
gc_checkpoint_fiber_f(va_list);
-//TODO: quorum timeout should be used instead
-double snap_confirm_timeout = 5.0; /* seconds */
-
/**
* Waitpoint stores information about the progress of confirmation.
* In the case of multimaster support, it will store a bitset
@@ -422,7 +419,7 @@ gc_txn_rollback_cb(struct trigger *trigger, void *event)
/**
* Waiting for confirmation of all "sync" transactions
- * during snap_confirm_timeout or fail.
+ * during confirm timeout or fail.
*/
static int
gc_wait_confirm(void)
@@ -442,7 +439,7 @@ gc_wait_confirm(void)
txn_on_rollback(tle->txn, &on_rollback);
int rc = fiber_cond_wait_timeout(&cwp.confirm_cond,
- snap_confirm_timeout);
+ txn_limbo_confirm_timeout(&txn_limbo));
fiber_cond_destroy(&cwp.confirm_cond);
if (rc != 0) {
/* Clear the triggers if the timeout has been reached. */
diff --git a/src/box/txn_limbo.c b/src/box/txn_limbo.c
index 03cbed703..2e3d7a278 100644
--- a/src/box/txn_limbo.c
+++ b/src/box/txn_limbo.c
@@ -229,6 +229,13 @@ txn_limbo_ack(struct txn_limbo *limbo, uint32_t replica_id, int64_t lsn)
}
}
+double
+txn_limbo_confirm_timeout(struct txn_limbo *limbo)
+{
+ (void)limbo;
+ return replication_synchro_timeout;
+}
+
void
txn_limbo_init(void)
{
diff --git a/src/box/txn_limbo.h b/src/box/txn_limbo.h
index c0b821a23..23019e5d9 100644
--- a/src/box/txn_limbo.h
+++ b/src/box/txn_limbo.h
@@ -185,6 +185,9 @@ txn_limbo_last_entry(struct txn_limbo *limbo)
in_queue);
}
+double
+txn_limbo_confirm_timeout(struct txn_limbo *limbo);
+
void
txn_limbo_init();
next prev parent reply other threads:[~2020-06-15 23:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-10 14:34 Leonid Vasiliev
2020-06-11 9:02 ` Serge Petrenko
2020-06-15 22:28 ` Vladislav Shpilevoy
2020-06-15 23:05 ` Vladislav Shpilevoy [this message]
2020-06-18 11:43 ` Leonid Vasiliev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9d1ccba6-744c-2a2c-f06b-aec89440a58c@tarantool.org \
--to=v.shpilevoy@tarantool.org \
--cc=gorcunov@gmail.com \
--cc=lvasiliev@tarantool.org \
--cc=sergepetrenko@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH] replication: add support of qsync to the snapshot machinery' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox