- Nov 29, 2023
-
-
Nikolay Shirokovskiy authored
Looks like this is typo introduced in the commit 0704ebb7 ("xlog: rework writer API"). Close #9428 NO_TEST=will be tested when fiber_cxx_invoke suppression will be removed NO_CHANGELOG=introduced in 3.0.0-alpha3 NO_DOC=bugfix
-
Serge Petrenko authored
Starting with commit f1c2127d ("replication: add META stage to JOIN") replication master appends a special section, called IPROTO_JOIN_META to the initial snapshot sent to the replica. This section contains the latest raft term and synchronous transaction queue owner and term. The section is only sent to nodes, which have a non-zero version_id. For some reason, version_id encoding for FETCH_SNAPSHOT (analog of JOIN for anonymous replicas) wasn't added in that commit, so anonymous replicas do not receive synchronous queue state. This leads to them raising ER_SPLIT_BRAIN errors later after join, when the first synchronous row arrives. In order to fix this, start encoding version_id in FETCH_SNAPSHOT requests. Closes #9401 @TarantoolBot document Title: new field in `IPROTO_FETCH_SNAPSHOT` request `IPROTO_FETCH_SNAPSHOT` request was bodyless (only contained a header) until now, but now it receives a body with a single field: `IPROTO_SERVER_VERSION` : MP_UINT -- an encoded representation of the server version of a replica issuing the request.
-
Yan Shtunder authored
Added a new is_sync parameter to `box.begin()`, `box.commit()`, and `box.atomic()`. To make the transaction synchronous, set the `is_sync` option to `true`. If any value other than `true/nil` is set, for example `is_sync = "some string"`, then an error will be thrown. Example: ```Lua -- Sync transactions box.atomic({is_sync = true}, function() ... end) box.begin({is_sync = true}) ... box.commit({is_sync = true}) box.begin({is_sync = true}) ... box.commit() box.begin() ... box.commit({is_sync = true}) -- Async transactions box.atomic(function() ... end) box.begin() ... box.commit() ``` Closes #8650 @TarantoolBot document Title: box.atomic({is_sync = true}) Added the new `is_sync` parameter to `box.atomic()`. To make the transaction synchronous, set the `is_sync` option to `true`. Setting `is_sync = false` is prohibited. If to set any value other than true for example `is_sync = "some string"`, then an error will be thrown.
-
Mergen Imeev authored
This patch adds dependencies support for roles. Part of #9078 @TarantoolBot document Title: dependencies for roles Roles can now have dependencies. This means that the verify() and apply() methods will be executed for these roles, taking into account the dependencies. Dependencies should be written in the "dependencies" field of the array type. Note, the roles will be loaded (not applied!) in the same order in which they were specified, i.e. not taking dependencies into account. Example: Dependencies of role A: B, C Dependencies of role B: D No other role has dependencies. Order in which roles were given: [E, C, A, B, D, G] They will be loaded in the same order: [E, C, A, B, D, G] The order, in which functions verify() and apply() will be executed: [E, C, D, B, A, G].
-
Vladimir Davydov authored
Closes #9405 @TarantoolBot document Title: Document then new built-in system event `box.wal_error` The new event is broadcast whenever Tarantool fails to commit a transaction to the write-ahead log (WAL), which usually means there's a problem with the underlying disk storage. The new event's payload is a table that currently contains the only field `count` that stores the number of WAL errors happened so far or nil if there hasn't been any WAL errors.
-
- Nov 28, 2023
-
-
Nikolay Shirokovskiy authored
Test suite run can produce coredumps in case of bugs. Unfortunately coredumps related to bugs are mixed with coredumps produced related to special test conditions, like when we test Tarantool response to deadly signal. Avoid producing coredumps in correct test suite run. NO_CHANGELOG=internal NO_DOC=internal
-
Vladimir Davydov authored
The fix is simple: look up the function in `box.func` by name and, if found, execute its `call` method. The only tricky part is to avoid the lookup before `box.cfg` is called because `box.func` is unavailable at the time. We achieve that by checking `box.ctl.is_recovery_finished`. Closes #9131 NO_DOC=bug fix
-
Nikolay Shirokovskiy authored
On Tarantool shutdown we destroy all the fibers in some sequence. We don't require that all the fibers are finished before shutdown. So it may turn out that we first destroy some alive fiber and then destroy another alive fiber which joins the first one. Currently we have use-after-free issue in this case because clearing `link` field of the second fiber changes `wake` field of the first fiber. Close #9406 NO_DOC=bugfix
-
Nikolay Shirokovskiy authored
Graceful shutdown is done in a special fiber which is started for example on SIGTERM. So it can run concurrently with fiber executing Tarantool init script. On init fiber exit we break event loop to pass control back to the Tarantool initialization code. But we fail to run event loop a bit more to finish graceful shutdown. The test is a bit contrived. A more real world case is when Tarantool is termintated during lingering box.cfg(). Close #9411 NO_DOC=bugfix
-
- Nov 27, 2023
-
-
Alexander Turenko authored
It was suggested by Igor Munkin (@igormunkin) in PR #9288. Part of #8862 Follows up PR #9288 NO_DOC=the help message is not an API, nothing to document NO_CHANGELOG=see NO_DOC NO_TEST=see NO_DOC
-
Mergen Imeev authored
According to ANSI, EXISTS is a predicate that tests a given subquery and returns true if it returns more than 0 rows, false otherwise. However, after 2a720d11, EXISTS worked correctly only if there were exactly 0 or 1 rows, and in all other cases it gave an error. This patch makes EXITS work properly. Closes #8676 NO_DOC=bugfix
-
Magomed Kostoev authored
Before this commit the space rollback had been treated as a new space creation, so it caused creation of a new space object in the Lua's box.space namespace. Since the preceding space drop removed the space object from the namespace, on the space rollback all the Lua users of the space loosed the track of its changes: the original space object is never updated anymore. This is fixed by detecting the space rollback and restoring the old space object instead of creating a new one. Closes #9120 NO_DOC=bugfix
-
Mergen Imeev authored
This patch fixes an assertion or segmentation error if a FOREIGN KEY or CHECK constraint is declared before the first column. Closes #8392 NO_DOC=bugfix
-
- Nov 23, 2023
-
-
Sergey Vorontsov authored
In the `.github/workflows/source.yml` workflow for preparing a tarball with the source code, a PackPack Docker container is already used. For uploading the tarball to the repo, the `aws` utility is used, which is installed before. To skip installation of additional packages on the self-hosted runners, we are moving to the GitHub-hosted runners, which already have the `aws` utility installed. Step `Prepare checkout` is removed because the GitHub-hosted runner is an ephemeral environment. NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci
-
Sergey Vorontsov authored
In this commit, we're fixing a problem with Docker in the workflow `.github/workflows/source.yml`. The mentioned workflow uses the `.github/actions/environment` action that needs a permission to make a loopback device for [1]. We didn't allow for that before due to missing container args, and it caused the following error: ``` umount: /tmp/luajit-test-vardir: must be superuser to unmount. 256000+0 records in 256000+0 records out 1048576000 bytes (1.0 GB, 1000 MiB) copied, 1.36702 s, 767 MB/s mount: /tmp/luajit-test-vardir: mount failed: Operation not permitted. Error: Process completed with exit code 1. ``` The problem started since commit af996bbb ("ci: dockerize linux workflows"). The simplest way to fix the issue is not to run the workflow inside a Docker container because a tarball with the source code is created via the `./packpack/packpack tarball` command that runs a Docker container as well. [1] https://github.com/tarantool/tarantool/issues/7472 NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci
-
Mergen Imeev authored
This patch removes the sql_default_value field from the struct field_def and the sql_default_value_expr field from the struct tuple_field as they are no longer needed. Follow-up #8793 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
- Nov 22, 2023
-
-
Sergey Bronnikov authored
The patch introduces a new CMake target "checkpatch", that checks patches on top of the master branch using script checkpatch.pl [1]. By default CMake looking for `checkpatch.pl` in a directory "checkpatch" in Tarantool's repository root directory and in a directories specified in PATH. By default commit revisions range checked by checkpatch is `origin/master..HEAD`, `origin/master` could be overridden with environment variable `CHECKPATCH_GIT_REF`. 1. https://github.com/tarantool/checkpatch NO_CHANGELOG=build NO_DOC=build NO_TEST=build
-
Vladimir Davydov authored
We run SVACE on static build. It doesn't compile unless libsvace is in the allow list. Follow-up #9242 NO_DOC=build NO_TEST=build NO_CHANGELOG=build
-
Vladimir Davydov authored
SVACE stopped working after commit 98b38e89 ("cmake: allow to bundle static dependencies in main project") changed the bundled libs directory layout. To fix this, let's introduce the new cmake option BUNDLED_LIBS_INSTALL_DIR and set it in static-build/CMakeLists.txt to the legacy location. Also, let's use the legacy directories for each external project's PREFIX, SOURCE_DIR, BINARY_DIR, and STAMP_DIR. Follow-up #9242 NO_DOC=build NO_TEST=build NO_CHANGELOG=build
-
- Nov 21, 2023
-
-
Igor Munkin authored
* Mark CONV as non-weak, to prevent elimination of its side-effect. * Fix ABC FOLD rule with constants. * test: add test for conversions folding * Add NaN check to IR_NEWREF. * test: fix flaky OOM error frame test * LJ_GC64: Fix lua_concat(). * test: introduce asserts assert_str{_not}_equal * ci: enable codespell * cmake: introduce target with codespell * codehealth: fix typos * tools: add cli flag to run profile dump parsers * profilers: purge generation mechanism * memprof: refactor symbol resolution * sysprof: fix crash during FFUNC stream * Fix last commit. * Print errors from __gc finalizers instead of rethrowing them. * x86/x64: Fix math.ceil(-0.9) result sign. * test: fix flaky fix-jit-dump-ir-conv.test.lua * IR_MIN/IR_MAX is non-commutative due to underlying FPU ops. * Fix jit.dump() output for IR_CONV. * Fix FOLD rule for x-0. * FFI: Fix pragma push stack limit check and throw on overflow. * Prevent compile of __concat with tailcall to fast function. * Fix base register coalescing in side trace. * Fix register mask for stack check in head of side trace. * x64: Properly fix __call metamethod return dispatch. Closes #8594 Closes #8767 Closes #9339 Part of #9145 NO_DOC=LuaJIT submodule bump NO_TEST=LuaJIT submodule bump
-
Ilya Verbin authored
Currently, if a statement is rolled back during rollback to a savepoint, it does not appear in neither on_commit nor on_rollback triggers. Fix this by running on_rollback triggers during the rollback to the savepoint. Closes #7810 NO_DOC=bugfix
-
Ilya Verbin authored
Currently, if a transaction is aborted by a fiber yield or by a timeout, txn_rollback_to_svp() is called to rollback all statements of the txn. After that the transaction is completely aborted on attempt to commit it. If an on_rollback trigger is set, it is called from txn_complete_fail(), however it receives an empty iterator, because at this point the statements are already destroyed. This patch invokes on_rollback triggers directly from txn_rollback_to_svp() for abort-by-yield, and postpones the rollback for abort-by-timeout. Closes #9340 NO_DOC=bugfix
-
Ilya Verbin authored
Currently on_rollback triggers are called on rollback of the whole transaction. To make it possible to invoke them on rollback to a savepoint, we need to pass a statement at which the savepoint was created. Needed for #9340 NO_DOC=refactoring NO_TEST=refactroring NO_CHANGELOG=refactoring
-
Vladimir Davydov authored
Now, one can specify a function name when configuring the lua_call privilege to a user or role. If omitted, the privilege will grant access to any global Lua function except for built-ins and stored procedures. If specified, the privilege will be applied only to the given function name, which may be a built-in, but still not a stored procedure. The function doesn't need to be defined at the time the privilege is granted. Since global Lua functions aren't stored in the database and hence have no numeric ids, we store string names in the _priv system table. Fortunately, it's already allowed for entity access so we don't need to update the system schema. The cached runtime access information is stored in a global hash table. Entries in the hash table are created on demand and removed if they store no grants. Closes #9360 NO_DOC=updated doc ticket manually
-
- Nov 20, 2023
-
-
Kirill Yukhin authored
NO_DOC=no code changes NO_TEST=no code changes NO_CHANGELOG=no code changes
-
- Nov 17, 2023
-
-
Sergey Ostanevich authored
The option --sync was ignored due to a misprint. The temporary dir was never removed, overflowing the /tmp by default. NO_TEST=test update NO_DOC=test update NO_CHANGELOG=test update
-
- Nov 16, 2023
-
-
Maksim Kokryashkin authored
This test is no longer needed in the Tarantool test suite since it was added to LuaJIT's test suite along with the fix for the issue mentioned in #3060 in scope of #8825 in commit tarantool/luajit@7b98314e0dacc7313c061aceeb0a32afd4e8cbce. Closes #3060 Related to #8825 NO_DOC=Cleanup NO_TEST=Already included in LuaJIT bump NO_CHANGELOG=Already included in LuaJIT bump
-
- Nov 14, 2023
-
-
Vladimir Davydov authored
Currently, the lua_call privilege simply doesn't work for registered functions. This patch fixes this issue: now, it grants access to any registered function that is written in Lua unless it's a built-in function, such as dostring, or a persistent function. Note, this patch renames access_check_call to access_check_lua_call to avoid confusion because this function is now global. It also renames access_check_eval to access_check_lua_eval for consistency. Closes #9363 NO_DOC=updated doc ticket manually NO_CHANGELOG=feature has not been released yet
-
Magomed Kostoev authored
Prior to this patch a bunch of illegal conditions was possible: 1. The joinability of a fiber could be changed while the fiber is being joined by someone. This could lead to double recycling: the first one happened on the fiber finish, and the second one in the fiber join. 2. The joinability of a dead joinable fiber could be altered, this led to inability jo join the dead fiber and free its resources. 3. A running fiber could be joined concurrently by two or more fibers, so the fiber could be recycled more than once (once per each concurrent join). 4. A dead recycled fiber could be made joinable and joined leading to the double recycle. Fixed these issues by adding a new FIBER_JOIN_BEEN_INVOKED flag: now the `fiber_set_joinable` and `fiber_join_timeout` functions detect the double join. Because of the API limitations both of them panic when an invalid condition is met: - The `fiber_set_joinable` was not designed to report errors. - The `fiber_join_timeout` can't raise any error unless a timeout is met, because the `fiber_join` users don't expect to receive any error from this function at all (except the one generated by the joined fiber). It's still possible that a fiber join is performed on a struct which has been recycled and, if the new fiber is joinable too, this can't be detected. The current fiber API does not allow to fix this, so this is to be the user's responsibility, they should be warned about the fact the double join to the same fiber is illegal. Closes #7562 @TarantoolBot document Title: `fiber_join`, `fiber_join_timeout` and `fiber_set_joinable` behave differently now. `fiber_join` and `fiber_join_timeout` now panic in case if double join of the given fiber is detected. `fiber_set_joinable` now panics if the given fiber is dead or is joined already. This prevents some amount of error conditions that could happen when using the API in an unexpected way, including: - Making a dead joinable fiber non-joinable could lead to a memory leak: one can't join the fiber anymore. - Making a dead joinable fiber joinable again is a sign of attempt to join the fiber later. That means the fiber struct may be joined later, when it's been recycled and reused. This could lead to a very hard to debug double join. - Making an alive joined fiber non-joinable would lead to the double free: once on the fiber function finish, and secondly in the active fiber join finish. Risks of making it joinable are described above. - Making a dead and recycled fiber joinable allowed to join the fiber once again leading to a double free. Any given by the API `struct fiber` should only be joined once. If a fiber is joined after the first join on it has finished the behavior is undefined: it can either be a panic or an incidental join to a totally foreign fiber.
-
Vladimir Davydov authored
Setting a box.cfg option to inf or nan can result in a crash or invalid behavior. For example, setting `box.cfg.checkpoint_interval` to 0/0 triggers an assertion failure. Let's add a check against inf and nan for all options. These special numbers don't make any sense as configuration option values anyway. Closes #4962 NO_DOC=bug fix
-
- Nov 13, 2023
-
-
Mergen Imeev authored
Since our SQL statistics are disabled, this field is no longer required. Closes #9343 NO_DOC=refactoring NO_TEST=refactroring NO_CHANGELOG=refactoring
-
Mergen Imeev authored
There is only one place where the field is filled with other then 0. Still, there is only two possible options, one of them is 0, the other is default value. Let's use them without filling the field. NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
- Nov 10, 2023
-
-
Magomed Kostoev authored
Prior to this patch only the flags given by the CMAKE_C_FLAGS were shown in the tarantool -v and Lua's tarantool.build.flags. Make it also show the flags from CMAKE_C_FLAGS_<CONFIG> and CFLAGS_LTO variables. The first one is config-specific set of flags (different for Debug, Release, RelWithDebInfo and MinSizeRel configs), the former is set in the cmake/lto.cmake if LTO is enabled. Closes #8022 NO_DOC=build
-
Vladimir Davydov authored
Currently, BOX_SPACE_MAX equals BOX_ID_NIL, which is used as an error indicator in the box C API. As a result, if box_space_id_by_name() returns BOX_ID_NIL, it's impossible to figure out whether there's no space with the give name or the space exists and has the id equal to BOX_SPACE_MAX. Let's decrement BOX_SPACE_MAX to fix this issue. Since this may break recovery, let's also introduce the new compatibility module option `box_space_max` to allow the user revert to the old behavior. Closes #9118 @TarantoolBot document Title: Document `compat.box_space_max` Please create an entry for the new compatibility module option at https://tarantool.io/compat/box_space_max. `compat.box_space_max` sets the max space id (`box.schema.SPACE_MAX`). The old limit is 2147483647. The new limit is 2147483646. The limit was decremented because the old value is used as an error indicator in the box C API (it equals `BOX_ID_NIL`).
-
Vladimir Davydov authored
TWEAK_INT now takes int64_t variable instead of int. Also added TWEAK_UINT that takes uint64_t variable. Needed for #9118 NO_DOC=internal NO_TEST=internal NO_CHANGELOG=internal
-
Vladimir Davydov authored
Instead of using ctest, let's simply run the CheckDependencies.cmake as a post build command if Tarantool was built without dependencies. The good thing about it is that the check will run even if the static build is created directly, without the /static-build/CMakeLists.txt wrapper. Part of #9242 NO_DOC=build NO_TEST=build NO_CHANGELOG=build
-
Vladimir Davydov authored
Follow-up commit https://github.com/tarantool/tarantool-ee/commit/40627acae33cd8b4fee096c6197c3bd3d124b4a4 ("test: move Lua tests from /static-build/test to /test/enterprise-tap") NO_DOC=gitignore NO_TEST=gitignore NO_CHANGELOG=gitignore
-
- Nov 09, 2023
-
-
Vladimir Davydov authored
zzip is installed to lib64/ on some systems by default so we need to explicitly set the install dir to lib/. Fixes commit 140fd681 ("cmake: allow to use bundled zzip"). NO_DOC=build NO_TEST=build NO_CHANGELOG=build
-
Vladimir Davydov authored
Currently, the BUILD_STATIC and BUILD_STATIC_WITH_BUNDLED_LIBS cmake options don't enable static linking of the OpenSSL library so we have to set OPENSSL_USE_STATIC_LIBS explicitly. Let's enable static linking of OpenSSL by default because we enable it anyway in all our official builds. NO_DOC=build NO_TEST=build NO_CHANGELOG=build
-
Vladimir Davydov authored
Tarantool EE needs to build or find some extra libraries. Let's add the new variable EXTRA_DEPENDENCIES_CMAKE for that. It'll be defined by the parent project. Since we might need to link the extra dependencies to the core library, we also add the new list variable EXTRA_CORE_DEPENDENCIES. If set, its contents will be appended to the core library dependencies list. Follow-up #9242 NO_DOC=build NO_TEST=build NO_CHANGELOG=build
-