From: Serge Petrenko <sergepetrenko@tarantool.org>
To: vdavydov.dev@gmail.com
Cc: tarantool-patches@freelists.org,
Serge Petrenko <sergepetrenko@tarantool.org>
Subject: [PATCH] box: ensure fiber processing box.cfg doesn't process messages from iproto
Date: Sat, 10 Nov 2018 14:24:36 +0300 [thread overview]
Message-ID: <20181110112436.1118-1-sergepetrenko@tarantool.org> (raw)
In box_cfg() we have a call to gc_set_wal_watcher(), which creates pipes
between 'wal' and 'tx' under the hood using cbus_pair().
While pipes are being created, the fiber calling gc_set_wal_watcher()
will process all the messages coming to 'tx' thread from iproto. This is
wrong, since we have a separate fiber pool to handle iproto messages,
and background fibers shouldn't participate in these messages
processing. For example, this causes occasional credential corruption in
the fiber executing box_cfg().
Since tx fiber pool is already created at the time gc_set_wal_watcher()
is called, we may forbid message processing for the fiber which calls
the function, one of the tx fiber pool fibers will wake us up when the
pipes are created.
Closes #3779
---
https://github.com/tarantool/tarantool/tree/sp/gh-3779-fix
https://github.com/tarantool/tarantool/issues/3779
src/box/gc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/box/gc.c b/src/box/gc.c
index 467eecb91..8f0ecb0b9 100644
--- a/src/box/gc.c
+++ b/src/box/gc.c
@@ -110,7 +110,7 @@ void
gc_set_wal_watcher(void)
{
wal_set_watcher(&gc.wal_watcher, "tx", gc_process_wal_event,
- cbus_process, WAL_EVENT_GC);
+ NULL, WAL_EVENT_GC);
}
void
--
2.17.2 (Apple Git-113)
next reply other threads:[~2018-11-10 11:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-10 11:24 Serge Petrenko [this message]
2018-11-12 11:40 ` Vladimir Davydov
2018-11-13 6:54 ` Serge Petrenko
2018-11-13 9:31 ` Vladimir Davydov
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=20181110112436.1118-1-sergepetrenko@tarantool.org \
--to=sergepetrenko@tarantool.org \
--cc=tarantool-patches@freelists.org \
--cc=vdavydov.dev@gmail.com \
--subject='Re: [PATCH] box: ensure fiber processing box.cfg doesn'\''t process messages from iproto' \
/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