[tarantool-patches] Re: [PATCH v2 2/7] box: move checks for key findability from space_vtab

  • From: Kirill Shcherbatov <kshcherbatov@xxxxxxxxxxxxx>
  • To: tarantool-patches@xxxxxxxxxxxxx, Mergen Imeev <imeevma@xxxxxxxxxxxxx>
  • Date: Wed, 18 Jul 2018 14:52:50 +0300

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.

Other related posts: