<HTML><BODY><div>LGTM<br><br> <blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;">Среда, 21 октября 2020, 18:28 +03:00 от Nikita Pettik <korablev@tarantool.org>:<br> <div id=""><div class="js-helper js-readmsg-msg"><div><div id="style_16032941302080218579_BODY">On 21 Oct 13:23, Aleksandr Lyapunov wrote:<br>> Add an option that disables hints in tree indexes.<br>><br>> <a href="https://github.com/tarantool/tarantool/issues/4927" target="_blank">https://github.com/tarantool/tarantool/issues/4927</a><br>> <a href="https://github.com/tarantool/tarantool/tree/alyapunov/gh-4927-optional-hints" target="_blank">https://github.com/tarantool/tarantool/tree/alyapunov/gh-4927-optional-hints</a><br><br>LGTM<br> <br>> v2 changes:<br>> * int template parameter was replaced by bool.<br>> * fix compilation error, just a couple of casts added:<br>><br>> @@ -542,7 +542,7 @@ tree_iterator_start(struct iterator *iterator, struct tuple **ret)<br>> struct txn *txn = in_txn();<br>> struct space *space = space_by_id(iterator->space_id);<br>> bool is_rw = txn != NULL;<br>> - uint32_t mk_index = is_multikey ? res->hint : 0;<br>> + uint32_t mk_index = is_multikey ? (uint32_t)res->hint : 0;<br>> *ret = memtx_tx_tuple_clarify(txn, space, *ret, iid, mk_index, is_rw);<br>> if (*ret == NULL) {<br>> return iterator->next(iterator, ret);<br>> @@ -734,13 +734,14 @@ memtx_tree_index_get(struct index *base, const char *key,<br>> struct txn *txn = in_txn();<br>> struct space *space = space_by_id(base->def->space_id);<br>> bool is_rw = txn != NULL;<br>> - uint32_t mk_index = base->def->key_def->is_multikey ? res->hint : 0;<br>> + bool is_multikey = base->def->key_def->is_multikey;<br>> + uint32_t mk_index = is_multikey ? (uint32_t)res->hint : 0;<br>> *result = memtx_tx_tuple_clarify(txn, space, res->tuple, base->def->iid,<br>> mk_index, is_rw);<br>> return 0;<br>> }<br>><br>><br>><br>> Aleksandr Lyapunov (1):<br>> memtx: make tuple compare hints optional<br>><br>> Ilya Kosarev (1):<br>> memtx: move memtx_tree.c to memtx_tree.cc<br>><br>> src/box/CMakeLists.txt | 2 +-<br>> src/box/index_def.c | 2 +<br>> src/box/index_def.h | 6 +<br>> src/box/lua/schema.lua | 53 ++<br>> src/box/lua/space.cc | 7 +<br>> src/box/memtx_engine.c | 2 +<br>> src/box/memtx_tree.c | 1523 -------------------------------<br>> src/box/memtx_tree.cc | 1726 +++++++++++++++++++++++++++++++++++<br>> src/lib/salad/bps_tree.h | 19 +<br>> test/box/alter.result | 103 ++-<br>> test/box/alter.test.lua | 34 +<br>> test/box/errinj.result | 3 +-<br>> test/box/tree_pk.result | 314 +++++++<br>> test/box/tree_pk.test.lua | 115 +++<br>> test/box/tree_pk_multipart.result | 153 ++++<br>> test/box/tree_pk_multipart.test.lua | 64 ++<br>> 16 files changed, 2598 insertions(+), 1528 deletions(-)<br>> delete mode 100644 src/box/memtx_tree.c<br>> create mode 100644 src/box/memtx_tree.cc<br>><br>> --<br>> 2.7.4<br>></div></div></div></div></blockquote><br><div data-signature-widget="container"><div data-signature-widget="content"><div>--<br>Ilya Kosarev</div></div></div></div></BODY></HTML>