Tarantool development patches archive
 help / color / mirror / Atom feed
From: Kirill Shcherbatov <kshcherbatov@tarantool.org>
To: tarantool-patches@freelists.org, Mergen Imeev <imeevma@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH v2 2/7] box: move checks for key findability from space_vtab
Date: Wed, 18 Jul 2018 14:52:50 +0300	[thread overview]
Message-ID: <e2853472-1cb0-fcb3-68d4-c7cdfe96ad20@tarantool.org> (raw)
In-Reply-To: <38687f411d21ed4ac762f3d5716cf635aaf2ea4c.1531832794.git.imeevma@gmail.com>

Hi. Thank you for patch. Mostly it is looking good for me.

0. It would be great, if you describe in commit message, why you should move
this checks.

> +/**
> + * Check space for writeability.
> + */
> +static inline int
> +space_check_writable(struct space *space)> +/**
> + * Check if key is good enough
> + * to be used to find tuple.
> + */
> +static inline int
> +key_check_findable(struct space *space, uint32_t index_id, const char *key)
1. I don't like this comments. Please, make doxygen comments for them.

>  int
>  box_process1(struct request *request, box_tuple_t **result)
2. As I see, box_process1 is used only in a single place, in tx_process1; It is also extra small now.
Do we really need it in header? Maybe it worth to inline it?


> -/**
> - * Wrapper around vy_lsm_find() which ensures that
> - * the found index is unique.
> - */
> -static  struct vy_lsm *
> +struct vy_lsm *
>  vy_lsm_find_unique(struct space *space, uint32_t index_id)
3. It also lacks a good comment, like vy_unique_key_validate has.

      reply	other threads:[~2018-07-18 11:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1531832794.git.imeevma@gmail.com>
2018-07-17 13:08 ` [tarantool-patches] [PATCH v2 1/7] box: add space address to index_replace imeevma
2018-07-18  8:06   ` [tarantool-patches] " Vladislav Shpilevoy
2018-07-17 13:08 ` [tarantool-patches] [PATCH v2 2/7] box: move checks for key findability from space_vtab imeevma
2018-07-18 11:52   ` Kirill Shcherbatov [this message]

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=e2853472-1cb0-fcb3-68d4-c7cdfe96ad20@tarantool.org \
    --to=kshcherbatov@tarantool.org \
    --cc=imeevma@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH v2 2/7] box: move checks for key findability from space_vtab' \
    /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