- 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
-
Vladimir Davydov authored
There's EMBED_LUZIP cmake option that embeds the Lua zip module in Tarantool binary. Since the Lua zip module depends on the zzip library, it also links the zzip library. The option is used only by Tarantool EE so there's no config for bundling the zzip library in the CE repository. Now, that we bundle all static build dependencies in the main project cmake config, let's add zzip bundling code here as well. The code of /cmake/BuildZZIP.make is copied from /static-build/CMakeLists.txt of the EE repository. Follow-up #9242 NO_DOC=build NO_TEST=build NO_CHANGELOG=build
-
Vladimir Davydov authored
The BUILD_STATIC cmake config option forces the build system link Tarantool binary statically with its dependencies. It expects that all static libraries on which Tarantool binary depends are available at build time. We don't use this option directly to create static binaries because it would produce different results on different build systems. Instead, we use the separate cmake config located in the static-build directory, which fetches all Tarantool dependencies from a predefined location before building a static binary. Having a separate cmake config is inconvenient. Let's enable bundling of static binary dependencies right in the main project cmake config, like we bundle, for example, libcurl. To achieve that, the new build option was introduced BUILD_STATIC_WITH_BUNDLED_LIBS. It implies BUILD_STATIC and also fetches and builds all required dependencies, like the static-build cmake config used to. The latter doesn't do it anymore; from now on, it just sets BUILD_STATIC_WITH_BUNDLED_LIBS when building Tarantool. We can't remove the static-build cmake config yet because there are quire a few CI workflows depending on it. Note that, just like BUILD_STATIC, BUILD_STATIC_WITH_BUNDLED_LIBS doesn't imply OPENSSL_USE_STATIC_LIBS so the latter should be set explicitly if one wants to use the static openssl library. However, setting OPENSSL_USE_STATIC_LIBS with BUILD_STATIC_WITH_BUNDLED_LIBS will force the build system use bundled static openssl library. This patch is relatively straightforward. It just moves the external projects from /static-build/cmake/AddDependencyProjects.cmake to /cmake adding build dependencies where required and setting variables that are set by the corresponding /cmake/FindXXX.cmake configs. There are a few things that should be noted separately though: - We dropped the ZLIB_FOUND check from the main project cmake config. It was used for building EE but the latter is going to be broken anyway once this patch is committed. We'll fix it in following commits. - FindLibUnwind referenced zlib library by ZLIB::ZLIB. We don't set it for bundled zlib so let's use ZLIB_LIBRARIES instead. - We don't need to detect dependency cflags while building bundled libraries as we can reuse the flags set by the main project. - We don't use HARDENING_LDFLAGS because it makes no sense when building static libraries. Closes #9242 NO_DOC=build NO_TEST=build NO_CHANGELOG=build
-
Vladimir Davydov authored
Currently, we simply include the libyaml source directory into the main project. The problem is that libyaml uses ICU. If ICU is built outside the main project cmake config, as it's the case with the static-build, both the main project and libyaml cmake configs will use the same ICU version. However, if we build ICU in the main project, as we intend to do to resolve #9242, it may not work. To fix that, we need to use the external project API to build libyaml. Needed for #9242 NO_DOC=build NO_TEST=build NO_CHANGELOG=build
-
Vladimir Davydov authored
There's no need in it because we closed Tarantool symbols long ago and now export only those symbols that are specified in exports files. Let's remove the useless code. Needed for #9242 NO_DOC=build NO_TEST=build NO_CHANGELOG=build
-
Vladimir Davydov authored
The tests are TAP compatible and applicable to all Tarantool builds so there's no need to run them with ctest. We just need to add a couple skip conditions: - The luarocks test shouldn't be run on dynamic builds because luarocks modules aren't embedded there. - The traceback test should be run only if ENABLE_BACKTRACE was set at build time. Part of #9242 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
Mergen Imeev authored
NO_DOC=tests NO_TEST=tests NO_CHANGELOG=tests
-
- Nov 08, 2023
-
-
godzie44 authored
unit test, in case when assertion failed NO_DOC=test NO_CHANGELOG=test
-
Ilya Verbin authored
See the doc bot request for the description. Benchmark results: NO_WRAP $ taskset 0x2 compare.py benchmarks ./memtx.perftest.old ./memtx.perftest.new \ --benchmark_min_warmup_time=10 \ --benchmark_repetitions=30 \ --benchmark_report_aggregates_only=true \ --benchmark_filter=TreeReplaceRandomExistingKeys [...] Comparing ./memtx.perftest.old to ./memtx.perftest.new Benchmark Time CPU Time Old Time New CPU Old CPU New ------------------------------------------------------------------------------------------------------------------------------------------------ MemtxFixture/TreeReplaceRandomExistingKeys_mean +0.0097 +0.0097 1073 1084 1073 1084 MemtxFixture/TreeReplaceRandomExistingKeys_median +0.0075 +0.0075 1062 1070 1062 1070 MemtxFixture/TreeReplaceRandomExistingKeys_stddev -0.1207 -0.1208 56 49 56 49 MemtxFixture/TreeReplaceRandomExistingKeys_cv -0.1291 -0.1292 0 0 0 0 NO_WRAP Closes #6762 @TarantoolBot document Title: Document `space:stat()` Product: Tarantool Since: 3.0 Root document: https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_space/ space_object:stat() - Get statistics on the memory usage Returns a table with the cumulative statistics on the memory usage by tuples in the space. The statistics is grouped by arena types: "memtx" or "malloc". For a detailed description of each field see `tuple_object:info()`. Note: The statistics is collected only for memtx storage engine. For other types of spaces, an empty table is returned. Example: ``` tarantool> box.space.test:stat() --- - tuple: memtx: data_size: 5100699 header_size: 96 field_map_size: 40 waste_size: 143093 malloc: data_size: 18850077 header_size: 70 field_map_size: 28 waste_size: 0 ... ```
-
Ilya Verbin authored
See the doc bot request for the description. Part of #6762 NO_CHANGELOG=next commit @TarantoolBot document Title: Document `tuple:info()` Product: Tarantool Since: 3.0 Root document: https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_tuple/ tuple_object:info() - Get information about the tuple Returns a table with the following fields: * data_size - Size of the MessagePack data in the tuple. This number equals to number returned by `tuple_object:bsize()`. * header_size - Size of the internal tuple header. * field_map_size - Size of the field map. Field map is used to speed up access to indexed fields of the tuple. * waste_size - The amount of excess memory used to store the tuple in mempool. * arena - Type of the arena where the tuple is allocated. Possible values are: "memtx", "malloc", "runtime".
-
Ilya Verbin authored
It is similar to TreeGetRandomExistingKeys, but performs box_replace() instead of box_index_get(). Needed for #6762 NO_DOC=benchmark NO_TEST=benchmark NO_CHANGELOG=benchmark
-
- Nov 07, 2023
-
-
Mergen Imeev authored
Before this patch, nameInUsingClause() expected old_col to be non-NULL, but this may not be the case. This patch fixes this feature accordingly. Follow-up #4467 NO_DOC=bugfix NO_CHANGELOG=feature was not released yet
-
Mergen Imeev authored
This patch replaces the SQL mechanism for setting expression default values with the BOX mechanism. Closes #8793 @TarantoolBot document Title: field default value in SQL SQL now uses the default mechanism for BOX fields. The main difference visible to the user is that now all NULL values explicitly inserted into a field with a default value will be replaced with a default value, which is different from the original SQL behavior. Additionally, default values are now inserted instead of NULL after the SQL BEFORE INSERT trigger but before the BOX BEFORE INSERT trigger. Previously, SQL default values were inserted before the SQL BEFORE INSERT trigger.
-
Mergen Imeev authored
This patch moves the VDBE function creation code from vdbe_emit_ck_constraint_create() to the new function vdbe_emit_create_function(). Because of this, the error message changes slightly. NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-