From: Aleksandr Lyapunov <alyapunov@tarantool.org> To: "Alexander V. Tikhonov" <avtikhon@tarantool.org>, Kirill Yukhin <kyukhin@tarantool.org>, Nikita Pettik <korablev@tarantool.org> Cc: tarantool-patches@dev.tarantool.org, Alexander Turenko <alexander.turenko@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH v1] vinyl: fix check vinyl_dir existence at bootstrap Date: Thu, 27 Aug 2020 15:28:39 +0300 [thread overview] Message-ID: <a58f1a02-185d-d1de-2194-9ed9c52fc0fb@tarantool.org> (raw) In-Reply-To: <e18b7e8f56787a9099429ff9e6fc6c1185d74723.1597985535.git.avtikhon@tarantool.org> Hi! Thanks for the patch! See 2 minor comments below. On 21.08.2020 07:56, Alexander V. Tikhonov wrote: > As mentioned above xdir_scan() function is not system call and can be > changed in any possible way and it can return any result value without > need to setup errno. So check outside of this function on errno could > be broken. > > To avoid of it we must avoid of errno checks outside of the function. I would say "To avoid that we must not check errno after call of the function." > diff --git a/src/box/xlog.c b/src/box/xlog.c > index 6ccd3d68d..74f761994 100644 > --- a/src/box/xlog.c > +++ b/src/box/xlog.c > @@ -511,13 +511,15 @@ xdir_open_cursor(struct xdir *dir, int64_t signature, > * @return nothing. > */ > int > -xdir_scan(struct xdir *dir) > +xdir_scan(struct xdir *dir, bool is_dir_required) The function comment also needs fixing. The new argument must have a description. The comment was already wrong though, it doesn't describe return value. Another problem is that the comment should be near function declaration (in xlog.h file) rather than definition. I would be glad if you fixed it.
next prev parent reply other threads:[~2020-08-27 12:28 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-08-21 4:56 Alexander V. Tikhonov 2020-08-27 12:28 ` Aleksandr Lyapunov [this message] 2020-08-27 14:06 ` Alexander V. Tikhonov
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=a58f1a02-185d-d1de-2194-9ed9c52fc0fb@tarantool.org \ --to=alyapunov@tarantool.org \ --cc=alexander.turenko@tarantool.org \ --cc=avtikhon@tarantool.org \ --cc=korablev@tarantool.org \ --cc=kyukhin@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH v1] vinyl: fix check vinyl_dir existence at bootstrap' \ /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