|
Ran
|
Files
305
|
Run time
20s
|
Badge
README BADGES
|
push
travis-ci
<a href="https://github.com/tarantool/tarantool/commit/<a class=hub.com/tarantool/tarantool/commit/c5232d683f36b387c0be10b7fd64d9d208771bfd">c5232d683<a href="https://github.com/tarantool/tarantool/commit/c5232d683f36b387c0be10b7fd64d9d208771bfd">">vinyl: fix assertion failure in vy_tx_handle_deferred_delete vy_tx_handle_deferred_delete() expects (righteously) that in case a deferred DELETE overwrites a statement in a secondary index write set and the overwritten statement wasn&#39;t skipped on commit (i.e. doesn&#39;t have txv-&gt;is_overwritten flag set), both the old and the new statement must be REPLACEs (see the comment to the corresponding assertions for more details). The problem is we don&#39;t set is_overwritten flag in case a statement doesn&#39;t have any effect (txv-&gt;is_nop is set), even if it was, in fact, overwritten in the primary index write set (see vy_tx_prepare). As a result, we get an assertion failure when we delete such statement in the same transaction, e.g. s = box.schema.space.create(&#39;test&#39;, {engine = &#39;vinyl&#39;}) s:create_index(&#39;pk&#39;, {parts = {1, &#39;unsigned&#39;}}) s:create_index(&#39;sk&#39;, {parts = {2, &#39;unsigned&#39;}}) s:replace{1, 1, 1} box.begin() s:update(1, {{&#39;+&#39;, 3, 1}}) -- adds no-op REPLACE to sk write set s:delete(1) -- produces deferred DELETE for sk box.commit() results in vy_tx_handle_deferred_delete: Assertion `vy_stmt_type(stmt) == IPROTO_REPLACE&#39; failed. Fix this by making sure we set is_overwritten for all overwritten statements in a secondary index write set. Closes #4294 (cherry picked from commit </a><a class="double-link" href="https://github.com/tarantool/tarantool/commit/<a class="double-link" href="https://github.com/tarantool/tarantool/commit/41219774cb5a5ec91bb4b416e2ca5b96f2bf3aa0">41219774c</a>">41219774c</a><a href="https://github.com/tarantool/tarantool/commit/c5232d683f36b387c0be10b7fd64d9d208771bfd">)
41569 of 50410 relevant lines covered (82.46%)
844120.75 hits per line
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|