- Oct 10, 2023
-
-
Vladimir Davydov authored
Required to suppress the ASAN leak detector. Closes #9158 NO_DOC=ASAN NO_TEST=ASAN NO_CHANGELOG=ASAN (cherry picked from commit bf62170f)
-
Nikolay Shirokovskiy authored
This test is quite a flaky in debug ASAN build. Let's fix it before turning debug ASAN on in CI. The issue is due to heavy load popen.read may return nil with 'TimedOut: timed out' error. Just read again as in the other cases of this test. Part of #7327 NO_CHANGELOG=internal NO_DOC=internal (cherry picked from commit 6f48b8d7)
-
Nikolay Shirokovskiy authored
This blocks us from turning debug ASAN CI currently. The ticket for the leakage is #9213. Part of #7327 NO_TEST=internal NO_CHANGELOG=internal NO_DOC=internal (cherry picked from commit 37d0fdbf)
-
- Oct 09, 2023
-
-
Serge Petrenko authored
Force recovery first tries to collect all rows of a transaction into a single list, and only then applies those rows. The problem was that it collected rows based on the row replica_id. For local rows replica_id is set to 0, but actually such rows can be part of a transaction coming from any instance. Fix recovery of such rows Follow-up #8746 Follow-up #7932 NO_DOC=bugfix NO_CHANGELOG=the broken behaviour couldn't be seen due to bug #8746 (cherry picked from commit 85df1c96)
-
Serge Petrenko authored
In order to preserve transaction boundaries over replication, Tarantool writes a global NOP row after the last transaction row, if this row happens to be local. This is done to make sure that the is_commit flag, which is set only in the last transaction row, reaches the replica. This wouldn't happen if the last row was local. This workaround works fine for transactions completely authored by one instance: when both global and local rows come from operations of a single master. However, it's possible to append local rows to a remote master's transaction on a replica. For example, one can use on_replace triggers to write to replica's local space on each new transaction coming from master. In this case essentially a global NOP entry is added at the end of a remote master's transaction. This leads to several problems. First of all, this bumps replica's LSN, which is counter-intuitive, given that the replica might even be read-only. Besides, in a star topology this leads to master being unable to connect to the replica later on due to their vclocks becoming incompatible. Secondly, even if replication channel between master and replica is bidirectional, it creates a new row which should be replicated from replica to master, but at the same time is the last row of the master's transaction. Once master receives this row, it breaks its connection to replica due to transaction boundary violation (the last row of the transaction is received without its beginning). Adding a NOP row became extraneous since the previous commit, which made relay find transaction boundaries by itself. Closes #8958 NO_DOC=bugfix (cherry picked from commit f5e52b2c)
-
Serge Petrenko authored
Some time ago we started writing transaction boundaries to WAL and respecting them in the replication stream: replicas wait for a full transaction receipt before applying it. However, during all these changes relay remained transaction-agnostic: it simply read single rows from WAL and sent them over to the receiver. This lead to a handful of ugly crutches: for example, tsn is not always equal to the lsn of the first global row of the transaction: if the first row is local, tsn is deduced from the first global row of the transaction. Also a dummy NOP was appended to the end of a transaction ending by a local row, so that is_commit flag wasn't lost by the replication. Let's make relay read a full transaction, filter out all the unnecessary rows, set the transaction boundaries accordingly and then send the transaction at once. Since in relay a single fiber sends data to the remote peer, there is no chance for a heartbeat to get in between rows of a single transaction: they're all sent at once. Hence the deletion of a corresponding guard `relay->is_sending_tx`. Prerequisite #8958 NO_DOC=internal change NO_CHANGELOG=internal change NO_TEST=covered by existing tests (cherry picked from commit f96782b5)
-
Serge Petrenko authored
Transaction boundaries were not updated correctly for transactions in which local space writes were made from a replication trigger. Existing transaction boundaries and row flags from the master were written as is on the replica. Actually, the replica should recalculate transaction boundaries and even WAIT_SYNC/WAIT_ACK flags. Transaction boundaries should be recalculated when a replica appends a local write at the end of the master's transaction, and WAIT_SYNC/WAIT_ACK should be overwritten when nopifying synchronous transactions coming from an old term. The latter fix has uncovered the bug in skipping outdated synchronous transactions: if one replica replaces a transaction from an old term with NOPs and then passes that transaction to the other replica, the other replica raises a split brain error. It believes the NOPs are an async transaction form an old term. This worked before the fix, because the rows were written with the original WAIT_ACK = true bit. Now this is fixed properly: we allow fully NOP async tranasctions from the old term. Closes #8746 NO_DOC=bugfix NO_CHANGELOG=covered by the next commit (cherry picked from commit 099cb2da)
-
- Oct 05, 2023
-
-
Nikolay Shirokovskiy authored
If non-terminal symbol is referenced in C code then destructor for expression is not called. Thus we don't need to duplicate. Otherwise we got a memory leak. See https://www.sqlite.org/cgi/src/doc/trunk/doc/lemon.html#destructor Close #9159 NO_DOC=bugfix NO_TEST=tested by debug ASAN CI (to be turned on) (cherry picked from commit 36ef3fb4)
-
- Oct 03, 2023
-
-
Nikolay Shirokovskiy authored
It is convenient to have a label to run ASAN CI without running full CI. NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci (cherry picked from commit c0025ffb)
-
Sergey Bronnikov authored
Performance tests added to perf directory are not automated and currently we run these tests manually from time to time. From other side source code that used rarely could lead to software rot [1]. The patch adds CMake target "test-perf" and GitHub workflow, that runs these tests in CI. Workflow is based on workflow release.yml, it builds performance tests and runs them. 1. https://en.wikipedia.org/wiki/Software_rot NO_CHANGELOG=testing NO_DOC=testing NO_TEST=testing (cherry picked from commit 5edcb712)
-
Sergey Bronnikov authored
Note that targets for running performance tests are generated only when CMAKE_BUILD_TYPE is equal to Release or RelWithDebug. Additionally, C++ performance tests require Google Benchmark library. Using non-debug build and having installed Google Benchmark library is rare case, so I suppose we don't need to introduce CMake option for performance testing. NO_CHANGELOG=testing NO_DOC=testing NO_TEST=testing infrastructure (cherry picked from commit a63d291b)
-
Sergey Bronnikov authored
The patch adds a targets for each C performance test in a directory perf/ and a separate target "test-c-perf" that runs all C performance tests at once. NO_CHANGELOG=testing NO_DOC=testing NO_TEST=test infrastructure (cherry picked from commit 68623381)
-
Sergey Bronnikov authored
The patch adds a targets for each Lua performance test in a directory perf/lua/ (1mops_write_perftest, box_select_perftest, uri_escape_unescape_perftest) and a separate target "test-lua-perf" that runs all Lua performance tests at once. NO_CHANGELOG=testing NO_DOC=testing NO_TEST=test infrastructure (cherry picked from commit 49d9a874)
-
Sergey Ostanevich authored
The test can be used for regression testing. It is advisable to tune the machine: check the NUMA configuration, fix the pstate or similar CPU autotune. Although, running dozen times gives more-less stable result for the peak performance, that should be enough for regression identification. NO_DOC=adding an internal test NO_CHANGELOG=ditto NO_TEST=ditto (cherry picked from commit 10870343)
-
Vladimir Davydov authored
The test runs get, select, pairs space methods with various arguments in a loop and prints the average method run time in nanoseconds (lower is better). Usage: tarantool box_select.lua Output format: <test-case> <run-time> Example: $ tarantool box_select.lua --pattern 'get|select_%d$' get_0 155 get_1 240 select_0 223 select_1 335 select_5 2321 Options: --pattern <string> run only tests matching the pattern; use '|' to specify more than one pattern, for example, 'get|select' --read_view use a read view (EE only) Apart from the test, this patch also adds a script that compares test results: $ tarantool box_select.lua --pattern get > base $ tarantool box_select.lua --pattern get > patched1 $ tarantool box_select.lua --pattern get > patched2 $ tarantool compare.lua base patched1 patched2 base patched1 patched2 get_0 149 303 (+103%) 147 (- 1%) get_1 239 418 (+ 74%) 238 (- 0%) NO_DOC=perf test NO_TEST=perf test NO_CHANGELOG=perf test (cherry picked from commit 114d09f5)
-
Nikolay Shirokovskiy authored
It is not convenient that test_downgrade_from_more_recent_version breaks if we create tag for new version and do not add next version to the downgrade versions list. If the version is released we should add it to the list anyway but it is not matter of this test. Follow up #9182 NO_DOC=internal NO_CHANGELOG=internal (cherry picked from commit 25b7411d)
-
- Oct 02, 2023
-
-
Nikolay Shirokovskiy authored
In this case we don't have knowledge how to downgrade correctly. Close #9182 NO_DOC=bugfix (cherry picked from commit cbe6a4da)
-
Yaroslav Lobankov authored
Add the fedora_38.yml and fedora_38_aarch64.yml workflow files to build Tarantool packages for x86_64 and aarch64 platforms. Closes tarantool/tarantool#9203 NO_DOC=ci/cd NO_TEST=ci/cd NO_CHANGELOG=ci/cd
-
Yaroslav Lobankov authored
Add the fedora_37.yml and fedora_37_aarch64.yml workflow files to build Tarantool packages for x86_64 and aarch64 platforms. Closes tarantool/tarantool#9204 NO_DOC=ci/cd NO_TEST=ci/cd NO_CHANGELOG=ci/cd
-
Yaroslav Lobankov authored
Add the debian_12.yml and debian_12_aarch64.yml workflow files to build Tarantool packages for x86_64 and aarch64 platforms. Closes tarantool/tarantool#9205 NO_DOC=ci/cd NO_TEST=ci/cd NO_CHANGELOG=ci/cd
-
- Sep 29, 2023
-
-
Serge Petrenko authored
mp_compare_decimal_any_number erroneously assumed that any float or double from which a decimal can't be created is either infinite or NaN. This is not true. Any float greater than 1e38 can't fit into our decimal representation. When such a float got compared to a decimal, an assertion fired, which was wrong. Luckily, on release build the comparison was correct. Only the assertion is wrong. Fix it. Closes #8472 NO_DOC=bugfix (cherry picked from commit f1b23896)
-
Serge Petrenko authored
Our split-brain detection machinery relies among other things on all nodes tracking the synchro queue confirmed lsn. This tracking was only added together with the split-brain detection. Only the synchro queue owner tracked the confirmed lsn before. This means that after an upgrade all the replicas remember the latest confirmed lsn as 0, and any PROMOTE/DEMOTE request from the queue owner is treated as a split brain. Let's fix this and only enable split-brain detection on the replica set once the schema version is updated. Thanks to the synchro queue freeze on restart, this can only happen after a new PROMOTE or DEMOTE entry is written by one of the nodes, and thus the correct confirmed lsn is propagated with this PROMOTE/DEMOTE to all the cluster members. Closes #8996 NO_DOC=bugfix (cherry picked from commit a844bd37)
-
- Sep 28, 2023
-
-
Sergey Kaplun authored
With this option enabled (new), the multiresults returned by a stored C function via iproto aren't wrapped in the additional msgpack array (old). Due to new behaviour some renames are performed: * `port_c_dump_msgpack()` -> `port_c_dump_msgpack_wrapped()`, since this is dump format with additional msgpack array encoded. * `port_c_dump_msgpack16()` -> `port_c_dump_msgpack()`, since this format is now the default new format of a msgpack dump. The behaviour of the C port msgpack dumping depends on the `c_func_iproto_multireturn` option: * uses `port_c_dump_msgpack()` if set to true (new), * uses `port_c_dump_msgpack_wrapped()` otherwise (old). Needed for #4799 @TarantoolBot document Title: Document `c_func_iproto_multireturn` compat option Please create a documentation page for the new compat option: https://tarantool.io/compat/c_func_iproto_multireturn In the new behaviour, the multiresults returned by a stored C function via iproto aren't wrapped in the additional msgpack array (old). ``` tarantool> compat.c_func_iproto_multireturn = 'old' --- ... tarantool> net_box.connect(box.cfg.listen):call('myclib.cfunc') --- - [true, -1] ... tarantool> compat.c_func_iproto_multireturn = 'new' --- ... tarantool> net_box.connect(box.cfg.listen):call('myclib.cfunc') --- - true - -1 ... ``` The new behaviour is consistent with the local call of the function via `box.func`: ``` tarantool> box.func['myclib.cfunc']:call() --- - true - -1 ... ``` Assume you have a stored C function that returns values like the following: ```c char *position = mp_encode_bool(buffer, true); box_return_mp(ctx, buffer, position); /* ... */ position = mp_encode_int(buffer, -1); box_return_mp(ctx, buffer, position); ``` If you want to preserve the format of the returned array for your C functions, when the `c_func_iproto_multireturn` option is set to "new", you should add the additional wrapping, like the following: ```c char *position = mp_encode_array(buffer_with_results, n_results); position = mp_encode_bool(position, true); /* ... */ position = mp_encode_int(position, -1); box_return_mp(ctx, buffer_with_results, position); ``` The amount of `box_return_mp()` calls indicates the number of values to be returned. Also, you should update its usage via `box.func` if there is any. (cherry picked from commit 96ee6d9b)
-
Pavel Balaev authored
luarocks version updated to version 3.9.2 Closes #6597 NO_DOC=The engine has been updated, the functionality has not changed NO_TEST=see NO_DOC (cherry picked from commit 1dc8cd81)
-
Oleg Babin authored
Before this patch if one called `vinyl`, `sql`, `gc` and `memory` functions from box.info() instance crashed. It's interesting that `replication_anon` functions worked ok. This patch fixes that crashes. Closes #9173 NO_DOC=bugfix (cherry picked from commit d85556c9)
-
- Sep 27, 2023
-
-
Igor Munkin authored
* test: fix fix-mips64-spare-side-exit-patching * test: fix `fillmcode()` generator helper * MIPS: Fix "bad FP FLOAD" assertion. * Handle table unsinking in the presence of IRFL_TAB_NOMM. * Fix handling of instable types in TNEW/TDUP load forwarding. * Fix predict_next() in parser (again). * Always exit after machine code page protection change fails. Part of #8825 NO_DOC=LuaJIT submodule bump NO_TEST=LuaJIT submodule bump
-
- Sep 22, 2023
-
-
Sergey Vorontsov authored
Download the readline and libiconv archives from the backup storage to avoid network issues with accessing https://ftp.gnu.org in the future. NO_DOC=build NO_TEST=build NO_CHANGELOG=build (cherry picked from commit e41c47a8)
-
- Sep 21, 2023
-
-
Vladimir Davydov authored
When a replica is restarted, it doesn't immediately switch to the 'follow' state. First it needs to sync. Let's wait for the 'follow' state a bit to fix the following failure: NO_WRAP [039] replication-luatest/gh_9049_schema_downgrade_t> [ fail ] [039] Test failed! Output from reject file /tmp/t/rejects/replication-luatest/gh_9049_schema_downgrade.reject: [039] Tarantool version is 3.0.0-alpha3-18-g6892907bad9d [039] TAP version 13 [039] 1..1 [039] # Started on Thu Sep 21 13:55:09 2023 [039] # Starting group: replication-luatest.gh_9049_schema_downgrade [039] not ok 1 replication-luatest.gh_9049_schema_downgrade.test_schema_downgrade [039] # ...st/replication-luatest/gh_9049_schema_downgrade_test.lua:33: expected: "follow" [039] # actual: "sync" [039] # stack traceback: [039] # ...st/replication-luatest/gh_9049_schema_downgrade_test.lua:31: in function 'replication-luatest.gh_9049_schema_downgrade.test_schema_downgrade' [039] # ... [039] # [C]: in function 'xpcall' [039] # artifacts: [039] # replica -> /tmp/t/039_replication-luatest/artifacts/replica-AgoXGWUXxvnc [039] # master -> /tmp/t/039_replication-luatest/artifacts/master-ZUTtyXyAX9YF [039] # Ran 1 tests in 1.768 seconds, 0 succeeded, 1 failed NO_WRAP Fixes commit 71de4b2c ("box: fix schema downgrade replication"). NO_DOC=test fix NO_CHANGELOG=test fix (cherry picked from commit c903b61b)
-
- Sep 18, 2023
-
-
Vladimir Davydov authored
We decided not to merge entries from Tarantool CE changelog to Tarantool EE changelog. Instead we now add a link to CE release notes to EE release notes. Update the script accordingly. NO_DOC=tools NO_TEST=tools NO_CHANGELOG=tools (cherry picked from commit 3dd1cffe)
-
Ilya Verbin authored
If MP_ERROR map contains two MP_ERROR_STACK keys, then the second call to `error_set_prev(effect, cur)' will crash, because `effect' is NULL, but `err == NULL' is false, because it is assigned on the first iteration. This patch raises an error if more than one MP_ERROR_STACK key is present. NO_DOC=bugfix Closes #9136 (cherry picked from commit 990aeee9)
-
- Sep 15, 2023
-
-
Yaroslav Lobankov authored
This patch is intended to resolve the following issue that appears while calling `cmake` for submodules from time to time: fatal: No tags can describe '<sha>'. Try --always, or create some tags. This happens because the `actions/checkout` GitHub action fetches the repository with the `--unshallow` option, but it doesn't do the same for submodules. So this leads to the error above while using `git describe` for submodules. This is fixed by converting a shallow submodule to a complete one. NO_DOC=ci NO_TEST=circuit NO_CHANGELOG=ci (cherry picked from commit 5be8268a)
-
- Sep 14, 2023
-
-
Sergey Bronnikov authored
The patch updates curl module to the version 8.3.0 [1] and updates a CMake module for building curl library. Changes in CMake module: - Option `CURL_STATICLIB` is gone and replaced with `BUILD_STATIC_LIBS`. - Option `CURL_USE_GNUTLS` was added and disabled by default. - NSS library support was removed and option `CURL_USE_NSS` has been removed as well. - Option `CMAKE_UNITY_BUILD` was added and disabled by default. - Option `CURL_DISABLE_FORM_API` was added and disabled by default. It is in fact depends on `CURL_DISABLE_MIME`, but anyway disabled explicitly. Changelog: https://curl.se/changes.html#8_3_0 1. https://github.com/curl/curl/releases/tag/curl-8_3_0 NO_DOC=libcurl submodule bump NO_TEST=libcurl submodule bump Fixes #9086 (cherry picked from commit 979b4adb)
-
- Sep 12, 2023
-
-
Sergey Bronnikov authored
The patch adds a fuzzing test for IPROTO decoding function xrow_decode_error(). Follows up #8921 Follows up #9098 NO_DOC=testing NO_CHANGELOG=testing (cherry picked from commit 2c700aab)
-
Vladimir Davydov authored
Some downgrade operations are performed with disabled system space triggers because they were prohibited recently (creation of SQL built-in functions) or never allowed (dropping a system space). This works fine on the instance running downgrade but apparently fails on replicas. To fix this issue, let's disable the checks the operations that prevent downgrade in the following scenarios: - in the fiber that is currently running a schema upgrade or downgrade; - in the applier fiber so that it can replicate changes done by upgrade or downgrade on the master; - during recovery so that DDL records written to the WAL can be replayed. We already have all the necessary infrastructure in-place - we use it for allowing DDL operations with an old schema for upgrade. Closes #9049 NO_DOC=bug fix (cherry picked from commit 71de4b2c) NOTE: We don't have the commit that disables DDL operations with an old schema in 2.11 so we have to backport bits of it from 3.0, see commit 97c2c9a4 ("box: disable DDL with old schema").
-
- Sep 11, 2023
-
-
Ilya Verbin authored
If `strlen(name)` is 1, `value_size` is 1, and `extra` is 0, then 15 bytes are allocated for `struct error_field` in error_payload_prepare(). However, the size of this structure is 16 because of the padding for the alignment. Thus TRASH() in error_payload_destroy() writes 1 byte beyond the structure. Closes #9098 NO_DOC=bugfix (cherry picked from commit 454ffd13)
-
- Sep 08, 2023
-
-
Sergey Bronnikov authored
The patch adds a fuzzing test for IPROTO decoding function xrow_header_decode(). NO_DOC=testing NO_CHANGELOG=testing (cherry picked from commit ae5964aa)
-
- Sep 07, 2023
-
-
Ilya Verbin authored
An attempt to print a dead fiber raised a fatal error, which is quite unexpected. This patch updates __tostring metamethod of fiber_object so that it pushes the "fiber: <fid> (dead)" string instead of the error. The __serialize metamethod is patched similarly. Closes #4265 NO_DOC=bugfix (cherry picked from commit 3421a3bd)
-
- Sep 05, 2023
-
-
Rimma Tolkacheva authored
Changed `else if` to `elseif`. There was a typo in the serializer that led to unclosed `if` statements. On a set of 50000 protobuf struct samples generates 863 (3% of all errors) fewer errors. NO_CHANGELOG=internal NO_DOC=fuzzer fix (cherry picked from commit 8c1e75e7)
-
Rimma Tolkacheva authored
Added checks before serializing return and break to program if inside returnable or breakable code block. On a set of 50000 protobuf struct samples generates 11749 (42% of all errors) fewer errors. NO_CHANGELOG=internal NO_DOC=fuzzer fix (cherry picked from commit 8df690b8)
-
Rimma Tolkacheva authored
The context object is created to manage the context of Lua program. It will be used in the next commit to check if `break` or `return` is inside a breakable or returnable code block. NO_CHANGELOG=internal NO_DOC=fuzzer fix (cherry picked from commit b7c65039)
-