- Jan 30, 2023
-
-
Vladislav Shpilevoy authored
A tuple update with the first operation creating a new field inside an array and the second operation trying to go into that field could crash. This happened because the branching function xrow_update_op_do_field_##op_type() didn't take into account newly set scalar fields and an `unreachable()` was hit. Part of #8216 NO_DOC=bugfix NO_CHANGELOG=next commit (cherry picked from commit eb26e732)
-
Vladislav Shpilevoy authored
They are going to be needed above their declaration prior to this patch. Also had to add a couple of obvious comments to calm checkpatch down. Needed for #8216 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring (cherry picked from commit 3260b930)
-
Yaroslav Lobankov authored
Generate a test build key when the ALPINE_BUILD_KEY secret is empty. It is needed for fork PRs where secrets are unavailable. NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci (cherry picked from commit a7b9ed4f)
-
Georgiy Lebedev authored
Since applied transactions are committed asynchronously, they are inherently 'read committed', hence their isolation level should be adjusted accordingly. Closes #8121 NO_DOC=bugfix (cherry picked from commit 7c12d490)
-
- Jan 27, 2023
-
-
Georgiy Lebedev authored
When we rollback a prepared statement that deletes an MVCC story, we need to reset the deleted story's PSN. Closes #7930 NO_DOC=bugfix (cherry picked from commit de938a6f)
-
Georgiy Lebedev authored
During transaction rollback, we unconditionally assign a PSN to it: we should do this only when necessary, i.e., a transaction is RW and is not already prepared. Needed for #7930 NO_CHANGELOG=refactoring NO_DOC=refactoring NO_TEST=refactoring (cherry picked from commit 494fe087)
-
Georgiy Lebedev authored
Currently, if transaction preparation fails, the transaction is left in an inconsistent state: it has a PSN assigned to it, but its status is not 'prepared' — fix this by resetting its PSN. Needed for #7930 NO_CHANGELOG=refactoring NO_DOC=refactoring NO_TEST=refactoring (cherry picked from commit c329e703)
-
Georgiy Lebedev authored
During preparation of insert statements in MVCC, we define an old story and abort all transactions that delete this story. If there exists an older story in the history chain, but the story is deleted by a prepared (not necessarily committed) transaction, we consider that it de-facto does not exist anymore — this logic is consistent, since during preparation of the transaction deleting this story, the conflict resolution described above was already done. In this manner, there can be no more than one prepared statement deleting a story at any point in time. Closes #8104 NO_DOC=bugfix (cherry picked from commit d7cf6f60)
-
Oleg Chaplashkin authored
Changed the work with hooks in the part of tests. Legacy approach: ``` g.before_all = function() ... end g.after_all = function() ... end ``` The logic of executing hooks will be expected and more controlled if use following approach: ``` g.before_all(function() ... end) g.after_all(function() ... end) ``` Resolve #8066 NO_DOC=test fix NO_TEST=test fix NO_CHANGELOG=test fix (cherry picked from commit ed136255)
-
- Jan 26, 2023
-
-
Sergey Vorontsov authored
Add building Alpine 3.16 packages for amd64 and aarch64. Part of tarantool/tarantool-qa#266 NO_DOC=ci NO_TEST=ci (cherry picked from commit 9a11ed4a)
-
Sergey Vorontsov authored
* Update build-time and run-time dependencies. * Support build with gc64 enabled. * Disable sysprof due to the following error while building: NO_WRAP ``` <...>/third_party/luajit/src/lj_sysprof.c:29:10: fatal error: execinfo.h: No such file or directory 29 | #include <execinfo.h> | ``` NO_WRAP * Update .pack.mk to set package version in the case of a git tag to the following format: 2.11.0[_<release type>] Where `<release type>` is `alpha1`, `beta1`, `rc1`, etc. Note, we have an extra logic when the git tag is `x.x.x-entrypoint`. Alpine build system doesn't support package name with such kind of version and that's why we use `alpha0` instead of `entrypoint`. See for details [1]. * Update .pack.mk to set package version in the other cases to the following format: 2.11.0_<release type>_p<N> Where `<release type>` is `alpha1`, `beta1`, `rc1`, etc and `<N>` is the patch number after the latest release. Unfortunately, we cannot use the similar version pattern that we use for dev DEB/RPM packages (`2.11.0_<release type>.<N>.dev`) because Alpine build system doesn't support it. Plus, we have the same logic for `entrypoint` here. See for details [1]. [1] https://wiki.alpinelinux.org/wiki/APKBUILD_Reference#pkgver Part of tarantool/tarantool-qa#266 NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci (cherry picked from commit 407a4d7f)
-
Serge Petrenko authored
test_promote_no_quorum testcase in election_pre_vote test started flaky hanging after commit 5765fdc4 ("raft: fix 'manual' nodes bumping the term excessively"). Disable it until the issue (#8217) is resolved. In-scope-of #8217 NO_DOC=tests NO_CHANGELOG=tests (cherry picked from commit 3273a51d)
-
Sergey Ostanevich authored
Promotion of a leader in the test requires previous leader state arrived to all replicas. Inconsistency may lead to promotion failure, which is correct from the raft point of view, but not expected by the test. Closes #7785 NO_DOC=test NO_CHANGELOG=test (cherry picked from commit 895cb2d2)
-
- Jan 25, 2023
-
-
Nikolay Shirokovskiy authored
Flight recorder uses mmapped file for performance reasons. Unfortunately if for some reason mapping is not possible we got SIGBUS on accessing mmapped memory. We already handle this issue on flight recorder start in [1]. But if we got SIGBUS in the meanwhile we currently got a crash. Let's just panic. [1] https://github.com/tarantool/tarantool-ee/commit/e68b84768f3ae76aa9f03d36dd6f0587b884e1bb CE Part of https://github.com/tarantool/tarantool-ee/issues/198 NO_DOC=stub for EE part NO_CHANGELOG=stub for EE part NO_TEST=tested in EE part (cherry picked from commit a72d602b)
-
Nikolay Shirokovskiy authored
Currently crash has code to report crashes to feedback URL. It does not belong to core. Also it brings dependencies from box to core with INSTANCE_UUID and REPLICASET_UUID variables. So let's move this part back to box. NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring (cherry picked from commit b75d1872)
-
Nikolay Shirokovskiy authored
Currently we keep nanoseconds but do not use them and as a result we have unneeded scaling. Let's use second precision which is on par with our need. Also drop ns_to_localtime. It can be written much shorter and it feels like we don't need distinct function here. Like when we formatting time in say.c. NO_TEST=refactoring NO_DOC=refactoring NO_CHANGELOG=refactoring (cherry picked from commit c457275a)
-
- Jan 24, 2023
-
-
Serge Petrenko authored
A node configured in 'manual' mode and promoted by `box.ctl.promote()` stays in is_candidate state for the whole term, even though it is not is_cfg_candidate. If such a node is the first one to notice leader death or to hit the election timeout, it bumps the term excessively, then immediately becomes a mere follower, because its is_candidate is reset with is_cfg_candidate. This extra term bump (one term after the node was actually promoted) is unnecessary and might lead to strange errors: tarantool> box.ctl.promote() --- - error: 'The term is outdated: old - 3, new - 4' ... Fix this by checking if a node is configured as a candidate before trying to start new elections. Closes #8168 NO_DOC=bugfix (cherry picked from commit 5765fdc4)
-
Serge Petrenko authored
There is a false assertion in raft_stop_candidate(): it assumes that the node must always have a running timer whenever it sees the leader. This is not true when the node is busy writing the new term on disk. Cover the mentioned case in the assertion. Closes #8169 NO_DOC=bugfix Co-authored-by:
Sergey Ostanevich <sergos@tarantool.org> (cherry picked from commit df6cf5ec)
-
Yaroslav Lobankov authored
The approach - name: Set output run: echo "::set-output name={name}::{value}" is deprecated [1]. Switching to the new approach: - name: Set output run: echo "{name}={value}" >> $GITHUB_OUTPUT [1] https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci (cherry picked from commit 627f6a26)
-
- Jan 23, 2023
-
-
Sergey Bronnikov authored
Changelog: https://curl.se/changes.html#7_87_0 New release contains fixes for 7 security problems [1]: https://curl.se/docs/CVE-2022-35252.html https://curl.se/docs/CVE-2022-32221.html https://curl.se/docs/CVE-2022-35260.html https://curl.se/docs/CVE-2022-42915.html https://curl.se/docs/CVE-2022-42916.html https://curl.se/docs/CVE-2022-43551.html https://curl.se/docs/CVE-2022-43552.html Patch adds a new option ENABLE_WEBSOCKETS defined in curl build infrastructure with it's default value used in 7.87.0. 1. https://curl.se/docs/releases.html NO_DOC=libcurl submodule bump NO_TEST=libcurl submodule bump Closes #8150 (cherry picked from commit 09f4eca1)
-
Sergey Bronnikov authored
Curl 7.87 uses CMake's keywords (for example GREATER_EQUAL [0]) available since CMake 3.7. However, we are still supporting old Ubuntu version where CMake version lower than 3.7 is used. This patch adds a script that enables CMake repository with newer CMake packages for Ubuntu 16.04 (Xenial) and bumps a required version of CMake. NOTE (regarding cmake3 package): Commit 1a62d874 ("build: update CMake minimum version to 3.1") [1] added an additional package requirement with "cmake3". This package has been created in addition to package "cmake", because CMake 3 had breaking changes [2]. Package "cmake3" has been provided only in Ubuntu 14.04 LTS (Trusty Tahr) [4], that will be EOLed in 2024, and CentOS 7, that was EOLed in Aug 2020 and will have end of security support in Jun 2024 [5]. Latest version of package "cmake3" for Ubuntu 14.04 is 3.5.1 [3], so it is not worth to bump version of cmake3 in requirements and I left it the same. 0. https://cmake.org/cmake/help/latest/command/if.html#greater-equal 1. https://github.com/tarantool/tarantool/commit/1a62d874db5f4780da5b35b6d4d0e3a296148920 2. https://cmake.org/cmake/help/latest/release/3.0.html#id4 3. https://launchpad.net/ubuntu/trusty/+package/cmake3 4. https://ubuntu.com/about/release-cycle 5. https://wiki.centos.org/About/Product Needed for #8150 NO_CHANGELOG=see the next commit NO_DOC=libcurl submodule bump NO_TEST=libcurl submodule bump (cherry picked from commit 7003272d)
-
- Jan 18, 2023
-
-
Vladimir Davydov authored
ICU symbol renaming was disabled in EE build by commit https://github.com/tarantool/tarantool-ee/commit/f51346d682e3afd93592023d0dedfb1e45167c7a ("static-build: disable symbols renaming for libicu"), because EE build exports ICU symbols so that they can be used by Lua modules. It isn't necessary in CE build, but since we're planning to reuse the CE cmake config in the EE repository, we should do that. Needed for https://github.com/tarantool/tarantool-ee/issues/185 NO_DOC=no functional changes NO_TEST=no functional changes NO_CHANGELOG=no functional changes (cherry picked from commit 9362f4a8)
-
Vladimir Davydov authored
Split it so that it can be reused in the EE repository: - static-build/cmake/AddDependencyProjects.cmake Adds the external projects that are required to build tarantool. The project names are stored in the TARANTOOL_DEPENDS variable. - static-build/cmake/AddTarantoolProject.cmake Should be called after AddDependencyProjects.cmake, because it uses the TARANTOOL_DEPENDS variable. Adds the Tarantool external project and sets the TARANTOOL_BINARY to the path to the built tarantool binary. - static-build/cmake/AddTests.cmake Should be called after AddTarantoolProject.cmake, because it uses the TARANTOOL_BINARY variable. Adds cmake tests for the static binary. Now, static-build/CMakeLists.txt just includes the three helper files. The helper files are designed in such a way that they can be included from the EE repository's CMakeLists.txt. We split the original config into the three helper files, because in the EE repository, we need to add extra dependency projects and extra tests. While we are at it, we also move the cmake tests from static-build/test/static-build to static-build/test and static-build/test/CheckDependencies.cmake to static-build/cmake/CheckDependencies.cmake. This commit introduces no functional changes - it just moves the code. Needed for https://github.com/tarantool/tarantool-ee/issues/185 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring (cherry picked from commit 520884a9)
-
Ilya Verbin authored
Currently `make` in `static-build` doesn't rebuild Tarantool when source files are changed. Fix this by setting BUILD_ALWAYS option, which forces rescan for changes of the external project [1]: > This option is not normally needed unless developers are expected to > modify something the external project's build depends on in a way that > is not detectable via the step target dependencies (e.g. SOURCE_DIR is > used without a download method and developers might modify the sources > in SOURCE_DIR). It is available since CMake 3.1, so update cmake_minimum_required, as we already require it (fa8d70ca). [1] https://cmake.org/cmake/help/latest/module/ExternalProject.html Part of #7536 NO_DOC=build NO_TEST=build NO_CHANGELOG=minor (cherry picked from commit a1f554bd)
-
- Jan 17, 2023
-
-
Serge Petrenko authored
Every libunwind error during backtrace collection is reported with `say_error`. Since commit 19abfd2a ("misc: get rid of fiber_gc") backtraces are collected on each fiber gc allocation, of which there are plenty. For some reason (https://github.com/tarantool/tarantool/issues/7980) each unw_step fails on mac, and an error is spammed to instance logs, even though the backtrace is actually collected. Silence the errors, since there is no much use for them anyway. And silence all of them just to be consistent. This doesn't close #7980, because that issue still needs a proper fix. Although its severity is ameliorated now. In-scope-of #7980 NO_DOC=bugfix NO_CHANGELOG=bugfix NO_TEST=nothing to test (cherry picked from commit c324eedd)
-
Igor Munkin authored
* ci: use strategy matrix for integration workflow * ci: change runner dispatch for LuaJIT testing NO_DOC=LuaJIT submodule bump NO_TEST=LuaJIT submodule bump NO_CHANGELOG=ci
-
- Jan 16, 2023
-
-
Vladimir Davydov authored
lbox_push_event_f and lbox_push_event_f callback functions used for passing the statement between txn and space on/before replace Lua triggers don't assume that the transaction may be aborted by yield after the current statement began (this may happen if a trigger callback yields). In this case, all statements in txn would be rolled back and txn_current_stmt would return NULL, leading to a crash. Let's fix this by checking if the transaction is still active and raising an error immediately if it isn't, thus skipping Lua triggers. Notes: - We merged lbox_pop_txn_stmt_and_check_format into lbox_pop_txn_stmt, because the latter is only called by the former. - Since lbox_push_event_f callback may now fail, we have to update lbox_trigger_run to handle it. Closes #8027 NO_DOC=bug fix (cherry picked from commit 1a678a5e)
-
- Jan 13, 2023
-
-
Vladimir Davydov authored
A remote space object presented by a net.box connection mimics the API of a local space object presented by box.space. Currently, it misses information about sequences. Let's add it. Note, we have to handle the case when the recently introduced _vspace_sequence system space view is missing on the remote host. To check that this works correctly, we reuse the 2.10.4 test data created by commit 1c33484d ("box: add auth_history and last_modified fields to _user space"). We also add the 'gen.lua' that can be used to regenerated the data. Closes #7858 NO_DOC=bug fix (cherry picked from commit 457b293c)
-
Vladimir Davydov authored
Note, this patch will be backported to 2.10 so we add upgrade function for 2.10.5, not for 2.11.0. Needed for #7858 @TarantoolBot document Title: Document `_space_sequence` and `_vspace_sequence` system spaces The `_space_sequence` system space was added long time ago (in 1.7.5) along with the `_sequence` and `_sequence_data` system spaces, but it was never documented. The space is used to attach sequences to spaces and has the following fields: 1. 'id', type 'unsigned'. Space id. 2. 'sequence_id', type 'unsigned'. Id of the attached sequence. 3. 'is_generated', type 'boolean'. True if the sequence was created automatically (`space:create_index('pk', {sequence = true})`) 4. 'field', type 'unsigned'. Id of the space field that is set using the attached sequence. 5. 'path', type 'string'. Path to the data within the field that is set using the attached sequence. The `_vspace_sequence` is a system space view of the `_space_sequence` space that, like any other system space view, shows only rows accessible by the current user. It will be introduced in Tarantool 2.10.5. (cherry picked from commit 06ee1134)
-
Aleksandr Lyapunov authored
When a transaction is in read-confirmed state it must ignore all prepared changes, and if it actually ignores something - it must fall to read-view state. By a mistake the check relied not on actual skipping of a prepared statement, but on the fact that there is a deleting statement. That leads to excess conflicts for transactions with read-committed isolation level. Fix it by raising a conflict only if a deleting statement is skipped. Closes #8122 Needed for #7202 NO_DOC=bugfix (cherry picked from commit 91d6d70f)
-
Aleksandr Lyapunov authored
Read lists (read set and other similar lists) are used only for detecting a conflict when another transaction is committed. Once a transaction is prepared (no matter with success or not) those lists are no more needed. Moreover, in some part of code it is expected that there can be no read set of already prepared tx. So let's clean those lists once a transaction is prepared. Closes #7945 NO_DOC=bugfix (cherry picked from commit ba8e00c0)
-
Aleksandr Lyapunov authored
There ware two functions - check_dup_clean and check_dup_dirty. Merge them to one. Also extract phantom checks from check_dup and call them explicitly. That will additionally simplify check_dup and will allow to get rid of temporary conflict trackers - memtx_tx_conflict. Note that this kind of object will remain in memory monitoring by now. It will be removed later. No logical changes. Part of #8122 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring (cherry picked from commit a5dd48ed)
-
Aleksandr Lyapunov authored
If a transaction writes to a gap that is tracked by some another transaction, the interval must be (usually) broken into parts, while new story must be explicitly added to the read set of reading transaction. Now both read tracker and conflict trackers are set in this case. But read tracker is enough in this case - when the writing tx is prepared it will conflict reading transaction, that's all we need. Let's leave only read tracker. Part of #8122 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring (cherry picked from commit e6f5090c)
-
Aleksandr Lyapunov authored
Each story has two ends: the beginning and the end. For each transaction both ends of a story could be visible or not. Now there's a function that checks visibility of both ends of a story. It can distinguish three cases: both ends are visible, both ends are invisible, and the beginning is visible while the end is not. The function returns true in the first and the last cases; the actual case is clarified with an additional function argument - visible_tuple, which is set to null in one of the cases.. Let's make two different functions for checking visibility of the beginning and the end of a story. Actually that is simple split of function into two parts. The visible_tuple argument will no longer be needed. No logical changes. Part of #8122 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring (cherry picked from commit b6ef41ef)
-
Aleksandr Lyapunov authored
There's no harm but also no sense in it. Part of #8122 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring (cherry picked from commit 8a565144)
-
Aleksandr Lyapunov authored
Hide structures and functions that are not required for API. No logical changes. Part of #8122 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring (cherry picked from commit 4cc04ca9)
-
Aleksandr Lyapunov authored
Option memtx_tx_manager_use_mvcc_engine changes the behavior of transaction execution workflow. Usually that is implemented as direct check of memtx_tx_manager_use_mvcc_engine. But there are places in the code that rely on the fact that some pointers are set to not null if the engine is enabled. That's a bit confusing. Let's always check for memtx_tx_manager_use_mvcc_engine option when it's needed to determine which workflow must be executed. Note that checking of memtx_tx_manager_use_mvcc_engine option is more correct: in case of delete of nothing (delete statement when a tuple was not found by given key) all the pointers including old_tuple and new_tuple are null, while logically we still need to use mvcc execution workflow. Note also that in this case the mvcc engine does (and must do) almost nothing, so there was no bug in the previous behaviour. Part of #8122 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring (cherry picked from commit f4c56892)
-
Aleksandr Lyapunov authored
No logical changes. Part of #8122 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring (cherry picked from commit 69479c89)
-
- Jan 12, 2023
-
-
Georgiy Lebedev authored
Since the fiber function is not expected to return (i.e., the inline assembly is not expected to return), remove the dummy memory operand used to indicate that the memory pointed to by the inline assembly pointer operand is clobbered. Closes #8125 NO_DOC=build diagnostic NO_CHANGELOG=build diagnostic NO_TEST=build diagnostic (cherry picked from commit 97a3af1b)
-
Vladimir Davydov authored
The status isn't used anywhere - to set the proper error when an aborted transaction is attempted to be used, we check out transaction flags (TXN_IS_CONFLICTED, TXN_IS_ABORTED_BY_YIELD, TXN_IS_ABORTED_BY_TIMEOUT). Let's use TXN_ABORTED instead. While we are at it, also set the transaction status to TXN_ABORTED when a transaction is aborted by yield or timeout and use it instead of checking flags where appropriate, since it's more convenient. Follow-up #8123 NO_DOC=code cleanup NO_TEST=code cleanup NO_CHANGELOG=code cleanup (cherry picked from commit 16f8969f)
-