From: Vladimir Davydov <vdavydov.dev@gmail.com> To: kostja@tarantool.org Cc: tarantool-patches@freelists.org Subject: [PATCH v3 3/5] wal: rename wal_watcher->events to pending_events Date: Wed, 24 Oct 2018 16:43:15 +0300 [thread overview] Message-ID: <f6b38c719551533c55c79cb2c53afc9413c41414.1540388352.git.vdavydov.dev@gmail.com> (raw) In-Reply-To: <cover.1540388352.git.vdavydov.dev@gmail.com> In-Reply-To: <cover.1540388352.git.vdavydov.dev@gmail.com> We will add another event bitmap to wal_watcher. To avoid confusion between them, let's rename wal_watcher->events. --- src/box/wal.c | 10 +++++----- src/box/wal.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/box/wal.c b/src/box/wal.c index d231cc98..b239acd4 100644 --- a/src/box/wal.c +++ b/src/box/wal.c @@ -1033,7 +1033,7 @@ wal_watcher_notify(struct wal_watcher *watcher, unsigned events) * mark the watcher to resend it as soon as it * returns to WAL so as not to lose any events. */ - watcher->events |= events; + watcher->pending_events |= events; return; } @@ -1062,13 +1062,13 @@ wal_watcher_notify_complete(struct cmsg *cmsg) return; } - if (watcher->events != 0) { + if (watcher->pending_events != 0) { /* * Resend the message if we got notified while * it was en route, see wal_watcher_notify(). */ - wal_watcher_notify(watcher, watcher->events); - watcher->events = 0; + wal_watcher_notify(watcher, watcher->pending_events); + watcher->pending_events = 0; } } @@ -1109,7 +1109,7 @@ wal_set_watcher(struct wal_watcher *watcher, const char *name, watcher->msg.watcher = watcher; watcher->msg.events = 0; watcher->msg.cmsg.route = NULL; - watcher->events = 0; + watcher->pending_events = 0; assert(lengthof(watcher->route) == 2); watcher->route[0] = (struct cmsg_hop) diff --git a/src/box/wal.h b/src/box/wal.h index 7371ce93..b7edcd43 100644 --- a/src/box/wal.h +++ b/src/box/wal.h @@ -101,7 +101,7 @@ struct wal_watcher { * It indicates that the message must be resend * right upon returning to WAL. */ - unsigned events; + unsigned pending_events; }; /** -- 2.11.0
next prev parent reply other threads:[~2018-10-24 13:43 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-10-24 13:43 [PATCH v3 0/5] Delete old WAL files if running out of disk space Vladimir Davydov 2018-10-24 13:43 ` [PATCH v3 1/5] wal: preallocate disk space before writing rows Vladimir Davydov 2018-10-24 17:08 ` Konstantin Osipov 2018-10-25 9:24 ` Vladimir Davydov 2018-10-24 13:43 ` [PATCH v3 2/5] wal: pass wal_watcher_msg to wal_watcher callback Vladimir Davydov 2018-10-24 13:43 ` Vladimir Davydov [this message] 2018-10-24 13:43 ` [PATCH v3 4/5] wal: add event_mask to wal_watcher Vladimir Davydov 2018-10-24 17:13 ` Konstantin Osipov 2018-10-24 13:43 ` [PATCH v3 5/5] wal: delete old wal files when running out of disk space Vladimir Davydov 2018-10-25 12:55 ` [PATCH v3 0/5] Delete old WAL files if " 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=f6b38c719551533c55c79cb2c53afc9413c41414.1540388352.git.vdavydov.dev@gmail.com \ --to=vdavydov.dev@gmail.com \ --cc=kostja@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='Re: [PATCH v3 3/5] wal: rename wal_watcher->events to pending_events' \ /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