- Sep 12, 2023
-
-
Kirill Yukhin authored
NO_DOC=no code changes NO_TEST=no code changes NO_CHANGELOG=no code changes
-
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
-
Pavel Semyonov authored
Remove issues released in 2.11.1 from master (3.0.0-alpha3) NO_CHANGELOG=changelog NO_DOC=changelog NO_TEST=changelog
-
- 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
-
- 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
-
Mergen Imeev authored
This patch introduces initial support for roles. Dependencies are not currently supported for roles. Part of #9078 @TarantoolBot document Title: Roles Two new options have been added: "roles" and "roles_cfg". The first one is an array and the second one is a map. Each of these can be defined per instance, replica set, group, and globally. As with almost all other options, with the exception of those defined as 'map', the 'roles' option for the lower scope will replace the roles for the higher scope. Value roles_cfg however defined as "map", so it will be merged. The "roles" option defines the roles for each instance. A role is a program that runs when a configuration is loaded or reloaded. If a role is defined more than once on an instance, it will still only be run once. Three functions must be defined in the role: validate(), apply() and stop(). Each of these functions should throw an error if it occurs. The "roles_cfg" option specifies the configuration for each role. In this option, the role name is the key and the role configuration is the value. On each run, all roles will be loaded (if necessary) in the order in which they were specified; the configuration for each role will then be validated using the corresponding validate() function in the same order; and then they will all be run with apply() function in the same order. If some roles have been removed from the instance, they will be stopped in reverse order using the stop() function. Example of a role structure: ``` local M = {} -- Validates configuration of the role. -- -- Called on initial configuration apply at startup and on -- configuration reload if the role is enabled for the given instance. -- -- The cfg argument may have arbitrary user provided value, -- including nil. -- -- Must raise an error if the validation fail. function M.validate(cfg) -- <...> end -- Applies the given configuration of the role. -- -- Called on initial configuration apply at startup and on -- configuration reload if the role is enabled for the given instance. -- -- The cfg argument may have arbitrary user provided value, -- including nil. -- -- Must raise an error if the given configuration can't be applied. function M.apply(cfg) -- <...> end -- Stops the role. -- -- Called on configuration reload if the role was enabled before -- and removed now from the list of roles of the given instance. -- -- Should cancel all background fibers and clean up hold -- resources. -- -- Must raise an error if this action can't be performed. function M.stop() -- <...> end return M ```
-
Nikolay Shirokovskiy authored
They are rather noisy. Also delete debug log on arena creation. These two make sense only with each other. Part of #7327 NO_TEST=internal NO_DOC=internal NO_CHANGELOG=internal
-
- 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
-
Gleb Kashkin authored
All user-defined users and roles are not being removed and their privileges are not being revoked when this user or role is removed from config. This is done to prevent extreme repercussions of misconfiguration, e.g. empty config is provided to cluster and it breaks up. Default users and roles are not supposed to be changed, so this rule does not apply to them. Now all of non-default privileges will be revoked if such user or role is removed from config. Default users: * guest * admin Default roles: * super * public * replication Part of #8967 NO_DOC=documentation request will be filed manually for the whole credentials
-
- Sep 06, 2023
-
-
Astronomax authored
Prior to this patch, the table had no information about the leader other than his id in the "leader" field. It may not be convenient for the user to search for a name corresponding to a given id. Much more convenient to see the leader's name in box.info.election. Closes #8931 @TarantoolBot document Title: Document `box.info.election` box.info.election now contains one more field: `leader_name`: string. There are several possible values for this field: - `nil`, if there is no leader in a cluster. - `box.NULL`, if there is a leader, but he does not have a name. - `some string`, if there is a leader and he has a name. Example: ```console tarantool> box.info.election --- - leader_idle: 0 leader_name: node1 state: leader vote: 1 term: 3 leader: 1 ... ``` [box-info-election] https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_info/election/
-
Ilya Verbin authored
The wording "Check constraint 'constr_name' failed for tuple" implies that the tuple should follow. This patch adds the missed "a" article. Closes #9045 NO_DOC=minor NO_CHANGELOG=minor
-
Magomed Kostoev authored
The tuple_compare_slowpath comparator had unreachable branch under this condition: `key_def->part_count == 1 && part->fieldno == 0 && (!has_json_paths || part->path == NULL)`. The condition will never be true in the function context. It has been introduced in the commit c8b87dc7 ("Speed up tuple_compare()."), when there was no sqeuential comparators, and so it was reasonable at that moment. But since the sequential comparators had been introduced in the commit 78102868 ("Don't store offsets for sequential multi-parts keys") the condition became permanently falsy. There're two ways it can be true: 1. `key_def->part_count == 1 && part->fieldno == 0 && !has_json_paths` 2. `key_def->part_count == 1 && part->fieldno == 0 && has_json_paths && part->path == NULL` Condition 1 will never happen because if we have a key starting from `fieldno = 0` with any part count following and without JSON paths, then it is compared using `tuple_compare_sequential` instead. Proof: 1. The key is sequential if and only if it does not have JSON paths and for all key parts `index_def->parts[i].fieldno == i`. 2. The `key_def->part_count == 1 && part->fieldno == 0 && !has_json_paths` condition fully satisfies this condition. 3. The `tuple_compare_slowpath` is only set as a comparator if the key is not sequential. Proof: The only places the comparator is set are: - `key_def_set_compare_func_fast` under the `!is_sequential` condition. - `key_def_set_compare_func_plain` under the `!key_def_is_sequential` condition. - `key_def_set_compare_func_json`, which is only called under `def->has_json_paths` condition, which conflicts with the `!has_json_paths` condition. Condition 2: has JSON path means we have `path` parameter in the index definition, but the following condition requires the path to be `NULL`, which is impossible if the part count is 1. Proof: 1. A key has JSON paths if and only if one of its parts' path does not equal NULL. 2. If key part count is one and the only part has path, then the `part->path == NULL` part fails. 3. If key part count is one and the only part does not have JSON path then the key has no JSON paths, goto Condition 1. Closes #8900 NO_DOC=dead code elimination NO_TEST=dead code elimination NO_CHANGELOG=dead code elimination
-
- Sep 05, 2023
-
-
Nikita Zheleztsov authored
The test starts the cluster and immediately tries to create a space on master. Sometimes it fails with "Can't modify data on a read-only instance - it is an orphan" error. When the instance is not in sync with sufficient number of nodes it has orphan status, which means the instance is read-only. Sometimes, the instance doesn't have enough time to connect to all instances and get out of orphan state. Let's add waiting until every node is connected to every other node in the replica set. Closes tarantool/tarantool-qa#326 NO_CHANGELOG=test NO_DOC=test
-
- Sep 04, 2023
-
-
Ilya Verbin authored
This patch fixes the following warning: NO_WRAP CMake Warning (dev) at cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message): The package name passed to `find_package_handle_standard_args` (GetLIBUNWINDVersion.cmake) does not match the name of the calling package (LibUnwind). This can lead to problems in calling code that expects `find_package` result variables (e.g., `_FOUND`) to follow a certain pattern. Call Stack (most recent call first): cmake/FindLibUnwind.cmake:82 (find_package_handle_standard_args) CMakeLists.txt:552 (find_package) NO_WRAP Closes #6998 NO_DOC=build NO_TEST=build NO_CHANGELOG=build
-
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
-
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
-
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
-
Gleb Kashkin authored
When the configuration changes and the instance is reloaded with it, some roles or users may have been removed from the config. In such case, it would be destructive to delete/disable them on the instance, so this test checks that all users and roles removed in config stay on the instance and keep all the privileges. Part of #8967 NO_DOC=test NO_CHANGELOG=test
-
Gleb Kashkin authored
This helpers does the following: 1. starts a server 2. writes a script/config 3. verifies invariants 4. writes a new script/config 5. reloads 6. verifies invariants after reload This patch allows to set not only script, but config too on the step 4, before the reload. Part of #8967 NO_DOC=test helper upgrade NO_CHANGELOG=see NO_DOC NO_TEST=see NO_DOC
-
Gleb Kashkin authored
Usually treegen.clean is called after a test by g.after_all function or an equivalent. In some rare cases internal helpers use their own treegen and clean up after themself. In such a case, treegen.clean would look for an internal list of all directories and find nil. This causes an error in ipairs iteration in internal logic and fails the whole test. This patch adds minor durability improvement for such a case. Now if internal list of all directories is nil (e.g. when treegen.clean was called beforehand), the function does nothing. Part of #8967 NO_DOC=test helper update NO_CHANGELOG=see NO_DOC NO_TEST=see NO_DOC
-
Ilya Verbin authored
Part of #6998 NO_DOC=copyright NO_TEST=copyright NO_CHANGELOG=copyright
-
Ilya Verbin authored
This file is not used since 2012, see commit [1]. NO_DOC=build cleanup NO_TEST=build cleanup NO_CHANGELOG=build cleanup [1]: https://github.com/tarantool/luajit/commit/018792452ecdcaeff9362e4238004420665b450b
-
Ilya Verbin authored
Currently this file is not needed. NO_DOC=build cleanup NO_TEST=build cleanup NO_CHANGELOG=build cleanup
-
Georgy Moshkin authored
Introduce fully temporary spaces: same as data-temporary space but with temporary metadata. Basically temporary spaces now do not exist on restart and do not exist on replicas. They can also be created, altered and deleted when box.cfg.read_only = true. To avoid conflicts with spaces created on replicas, the temporary space ids by default start in a special range starting at BOX_SPACE_ID_TEMPORARY_MIN. Temporary spaces currently do not support several features e.g. foreign key references (to and from), functional indexes, sql sequences, sql triggers, etc. This may change in the future. Implementing temporary spaces requires temporary tuples to be inserted into system spaces: tuples which are neither replicated or persisted. This mostly done in on_replace_dd_* triggers by dropping the txn->stmt->row. Closes #8323 @TarantoolBot document Title: Introduce fully temporary spaces with temporary metadata Temporary spaces are now data-temporary spaces with temporary metadata. Created by specifying { type = "temporary" } in the options. Temporary spaces will not exist upon server restart and will not exist on replicas. They can also be created in read-only mode.
-
Georgy Moshkin authored
A tiny preparatory commit for meta-temporary spaces NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
Georgy Moshkin authored
Move code that handles txn row counters into a separate function in preparation of meta-temporary spaces introduction. NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
Georgy Moshkin authored
Everywhere where we refer to temporary spaces we now say data-temporary. This is because temporary spaces were never truly temporary because their definitions would still be persisted and replicated and they couldn't be created on read-only replicas. In a following commit we will introduce a new fully temporary type of spaces, which will be just called 'temporary', so this commit signifies this terminology change. NO_DOC=renaming NO_CHANGELOG=renaming NO_TEST=renaming
-
Georgy Moshkin authored
Introduces a new field `type` to the space definition. Currently it can only be "normal" or "data-temporary". It is backwards compatible with temporary=true. @TarantoolBot document Title: Introduce space field type A new space definition field "type" can now be used to specify the type of the space. Usage: box.schema.create_space("s", { type = "normal" }). Currently only 2 types are supported: "normal" & "data-temporary", which is equivalent to { temporary = true }. Old-style { temporary = true } is still supported, but only one option either 'temporary' or 'type' may be specified at the same time. Space type "temporary" will be introduced in a later commit. In the future options "local", "synchronous", etc. may also be supported. NO_TEST=will be tested in the following commit
-
Ilya Verbin authored
If a lot of tests are running in parallel, 50 sec limit may not be enough. Let's increase it to 120 sec. Closes tarantool/tarantool-qa#273 NO_DOC=test NO_CHANGELOG=test
-
- Sep 01, 2023
-
-
Nikolay Shirokovskiy authored
This way we will have access to build info in those modules. In particularly build.asan flag is going to be used in buffer.lua in scope of #7327. Part of #7327 NO_TEST=internal NO_DOC=internal NO_CHANGELOG=internal
-
Nikolay Shirokovskiy authored
We already use this info in one of the test and going to use it more. Part of #7327 @TarantoolBot document Title: new tarantool.build.asan flag It is `true` if `ENABLE_ASAN` build option is set and `false` otherwise.
-
Vladimir Davydov authored
Vinyl tuples returned to the user are allocated with malloc. They may be pinned by Lua indefinitely. Currently, there's no way to figure out how much memory is occupied by these tuples. This commit adds a statistic to box.stat.vinyl() that accounts them. Closes #8485 @TarantoolBot document Title: Document `memory.tuple` statistic of `box.stat.vinyl()` The new statistic shows the total size of memory in bytes occupied by Vinyl tuples. It includes cached tuples and tuples pinned by the Lua world.
-
- Aug 30, 2023
-
-
Vladimir Davydov authored
Commit 97c2c9a4 ("box: disable DDL with old schema") added a check to the on-replace trigger installed on all system spaces that fails the operation if the schema version is outdated unless it's recovery time or the operation was issued by the fiber performing a schema upgrade. This new check breaks the replication use case: 1. Tarantool binary is updated on all instances to a version that requires a newer schema - OK. 2. box.schema.upgrade() is called on the master instance - OK. 3. Operations performed by the master to upgrade the schema are replicated to the replicas - FAIL. To fix this issue, let's bypass the schema version check for applier fibers. Follow-up #7149 Closes #9048 NO_DOC=bug fix NO_CHANGELOG=unreleased
-
Yaroslav Lobankov authored
This patch finally brings desired testing for static build packages. How it works: In a few words, we have two workflow files: calling and callable. The callable workflow (static_build_pack_test_deploy.yml) is parametrized and contains all the logic with the building, testing, and deploying packages. It takes just two inputs: package platform and JSON matrix for testing. The calling workflow (packaging.yml) just runs callable one with specific parameters and contains all the logic related to triggering by events and concurrency. The static_build_pack_test_deploy.yml workflow consists of three jobs: `build`, `test`, and `deploy`. Artifacts between jobs are passed via the `upload-artifact` and `download-artifact` actions. The `test` job is a matrix one and verifies packages on provided Linux distros passed through input. After the testing is done, the `deploy` job is intended to upload packages to repositories on a tag push, which means release or pre-release. Note, for starting Docker containers to test packages we use PackPack images because they have almost all requirements to run tests. Follows up #8771 Follows up #8840 Follows up #8866 Closes tarantool/tarantool-qa#322 NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci
-
Igor Munkin authored
* Fix maxslots when recording BC_TSETM. * Fix TDUP load forwarding after table rehash. * Fix binary number literal parsing. * Fix maxslots when recording BC_VARG, part 3. * test: fix flaky <unit-jit-parse.test.lua> again * Fix predict_next() in parser. * Revert to trivial pow() optimizations to prevent inaccuracies. * Fix pow() optimization inconsistencies. * Improve assertions. * Remove pow() splitting and cleanup backends. * test: introduce `samevalues()` TAP checker * MIPS: Add MIPS64 R6 port. * DynASM/MIPS: Fix shadowed variable. * MIPS64: Fix register allocation in assembly of HREF. * Prevent integer overflow while parsing long strings. * Fix LJ_MAX_JSLOTS assertion in rec_check_slots(). * Fix debug.getinfo() argument check. * ARM: Fix GCC 7 -Wimplicit-fallthrough warnings. * DynASM: Fix warning. * Fix GCC 7 -Wimplicit-fallthrough warnings. * Cleanup math function compilation and fix inconsistencies. * FFI: Eliminate hardcoded string hashes. * Windows: Add UWP support, part 1. * build: fix non-Linux/macOS builds * PPC: Add soft-float support to JIT compiler backend. * PPC: Add soft-float support to interpreter. * MIPS64: Add soft-float support to JIT compiler backend. * MIPS: Fix handling of spare long-range jump slots. * test: introduce mcode generator for tests * MIPS: Use precise search for exit jump patching. * sysprof: improve parser's memory footprint * tools: add execution permission to sysprof parser * sysprof: remove `split by vmstate` option Part of #8825 NO_DOC=LuaJIT submodule bump NO_TEST=LuaJIT submodule bump
-
- Aug 29, 2023
-
-
Yaroslav Lobankov authored
NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci
-
Yaroslav Lobankov authored
Run release build ASAN testing inside a Docker container created from the `tarantool/testing:ubuntu-jammy-clang16` Docker image with Clang 16 installed. Closes tarantool/tarantool-qa#319 NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci
-
Alexander Turenko authored
The test starts a child tarantool instance in the current working directory and run box.cfg(). The current working directory is a source directory. test-run.py runs many tests from it in parallel and in some circumstances it appears that the directory is locked by some other box.cfg() call from some other tarantool instance (maybe another test is doing the same). The test is rewritten to use a temporary directory for such runs. The test.interactive_tarantool helper is used for convenience instead of a popen wrapper that is written specifically for the test. NO_DOC=It is a fix of a test. NO_CHANGELOG=see NO_DOC
-
Ilya Verbin authored
For some unknown reason ASAN crashes with SIGSEGV on this test during shutdown. See tarantool/tarantool-qa#324 for details. NO_DOC=test NO_CHANGELOG=test
-
Oleg Chaplashkin authored
Bump test-run to new version with the following improvements: - Fix non-supported character in log file name [1] - luatest: bump luatest to 0.5.7-43-g251b35f [2] - luatest: bump luatest to 0.5.7-44-g2d51155 [3] [1] tarantool/test-run@c8465a5 [2] tarantool/test-run@e84fd00 [3] tarantool/test-run@22951e0 NO_DOC=test NO_TEST=test NO_CHANGELOG=test
-