[Tarantool-patches] [PATCH v1] vinyl: fix check vinyl_dir existence at bootstrap

Aleksandr Lyapunov alyapunov at tarantool.org
Thu Aug 27 15:28:39 MSK 2020


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.



More information about the Tarantool-patches mailing list