[Tarantool-patches] [PATCH 10/17] recovery: recovery_scan -- don't throw exception
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Sun May 3 21:47:15 MSK 2020
Thanks for the patch!
See 2 comments below.
> diff --git a/src/box/recovery.cc b/src/box/recovery.cc
> index 1c7665f87..af7910bdf 100644
> --- a/src/box/recovery.cc
> +++ b/src/box/recovery.cc
> @@ -134,12 +135,19 @@ recovery_scan(struct recovery *r, struct vclock *end_vclock,
>
> /* Scan the last xlog to find end vclock. */
> struct xlog_cursor cursor;
> - if (xdir_open_cursor(&r->wal_dir, vclock_sum(end_vclock), &cursor) != 0)
> - return;
> + if (xdir_open_cursor(&r->wal_dir, vclock_sum(end_vclock), &cursor) != 0) {
1. This becomes out of 80 symbols now. I propose to wrap '&cursor'
on the next line.
> + /*
> + * FIXME: Why do we ignore errors?!
2. Since we are talking about this, we also skip
xlog_cursor_next() returning -1 below.
> + */
> + return 0;
> + }
> +
> struct xrow_header row;
> while (xlog_cursor_next(&cursor, &row, true) == 0)
> vclock_follow_xrow(end_vclock, &row);
> +
> xlog_cursor_close(&cursor, false);
> + return 0;
> }
More information about the Tarantool-patches
mailing list