[Tarantool-patches] [PATCH 07/17] recovery: hot_standby_f -- don't throw exception
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Sun May 3 21:45:21 MSK 2020
Thanks for the patch!
On 28/04/2020 18:11, Cyrill Gorcunov wrote:
> Prepare for transition to plain C.
>
> Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
> ---
> src/box/recovery.cc | 23 +++++++++++++++--------
> 1 file changed, 15 insertions(+), 8 deletions(-)
>
> diff --git a/src/box/recovery.cc b/src/box/recovery.cc
> index 1b78fc915..996966a77 100644
> --- a/src/box/recovery.cc
> +++ b/src/box/recovery.cc
> @@ -494,18 +494,15 @@ hot_standby_f(va_list ap)
> struct recovery *r = va_arg(ap, struct recovery *);
> struct xstream *stream = va_arg(ap, struct xstream *);
> bool scan_dir = true;
> + int rc = 0;
>
> ev_tstamp wal_dir_rescan_delay = va_arg(ap, ev_tstamp);
> fiber_set_user(fiber(), &admin_credentials);
>
> struct wal_subscr ws;
> - auto guard = make_scoped_guard([&]{
> - wal_subscr_destroy(&ws);
> - });
> -
> wal_subscr_create(&ws, r->wal_dir.dirname);
>
> - while (! fiber_is_cancelled()) {
> + while (!fiber_is_cancelled()) {
I know that sometimes you may really want to change something,
that looks 'wrong' even when it is not related to the patch, but
please, lets better avoid such changes. They not only make the
patch bigger complicating the review, but also make it harder to
navigate the code in 'git blame', when you want to discover why
something was done and by whom.
More information about the Tarantool-patches
mailing list