- Apr 18, 2023
-
-
Ilya Verbin authored
This patch adds 4 methods of the key_def module instance to the `index_object.parts`, see the docbot request for details. The rest methods (new() and totable()) are not applicable here, because the instance is already created and pushed to the stack as a table. Closes #7356 @TarantoolBot document Title: `index_object.parts` methods Product: Tarantool Since: 3.0 Root document: https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_index/parts/ `index_object.parts` has the following methods: `extract_key()`, `compare()`, `compare_with_key()`, `merge()`. For their description and usage examples, refer to [Module key_def](https://www.tarantool.io/en/doc/latest/reference/reference_lua/key_def/#lua-object.key_def.key_def_object). --- Root document: https://www.tarantool.io/en/doc/latest/reference/reference_lua/key_def/ `index_object.parts` can be used like a key_def module instance for calling the corresponding methods. Example: ```lua box.schema.space.create('T') i = box.space.T:create_index('I', {parts={3, 'string', 1, 'unsigned'}}) box.space.T:insert{1, 99.5, 'X', nil, 99.5} i.parts:extract_key(box.space.T:get({'X', 1})) ``` The code above is equivalent to: ```lua key_def = require('key_def') box.schema.space.create('T') i = box.space.T:create_index('I', {parts={3, 'string', 1, 'unsigned'}}) box.space.T:insert{1, 99.5, 'X', nil, 99.5} k = key_def.new(i.parts) k:extract_key(box.space.T:get({'X', 1})) ```
-
Mikhail Elhimov authored
Introduced command 'tt-list-walk' Changes in 'tt-list' options: - dropped options -pre/post (previously used to implement walking functionality; no longer needed) - option -filter was renamed to -predicate (so it can be specified with just -p while previously at least -fil need to be used to avoid ambiguity with -fields option) Closes #8524 NO_DOC=gdb extension NO_TEST=gdb extension NO_CHANGELOG=gdb extension
-
- Apr 17, 2023
-
-
Ilya Verbin authored
There is a system include file TargetConditionals.h on macOS, which defines TARGET_OS_LINUX (and others) to 0 or 1. On the other side, TARGET_OS_LINUX is also defined by trivia/config.h.cmake, but there it has another possible values: undefined or 1. This inconsistency causes issues like #8445, when TARGET_OS_LINUX is defined (to 0) in one file and undefined in another. Let's always define it to 0 or 1. Closes #8445 NO_DOC=bugfix
-
Vladimir Davydov authored
This commit adds two new Lua functions: - `box.malloc.info()` is a public function that returns the total memory usage of internal data structures allocated with `malloc()`. This information is extracted from the `malloc_info()` output. See the doc bot request for details. - `box.malloc.internal.info()` is an internal function that returns a parsed XML document returned by `malloc_info()` as is. It isn't documented. We may need it to get the detailed information about the system memory allocator. Both functions are useful only on Linux and only if ASAN is disabled because otherwise `malloc_info()` is unavailable. On other platforms `box.malloc.info()` reports zero memory usage while `internal.info()` returns an empty table. Closes #7311 @TarantoolBot document Title: Document `box.malloc.info()` `box.malloc.info()` is a function that returns a table with two fields: ``` tarantool> box.malloc.info() --- - size: 2498560 used: 1835726 ... ``` The `used` value is the total amount of memory in bytes allocated by Tarantool for internal data structures with [`malloc()`][1]. The `size` value is the total amount of memory in bytes allocated from the system by the `malloc()` allocator. It may not be less than `used`. The function may be used before `box.cfg()` is called. Currently, the function is available only on Linux. On other systems it reports zero memory usage (`{size = 0, used = 0}`). [1]: https://man7.org/linux/man-pages/man3/malloc.3.html
-
Vladimir Davydov authored
We need an XML parser to parse the string returned by malloc_info. This commit implements a simple parser in Lua C that transforms an XML string into a Lua table. The parser is available both from C (luaT_xml_decode) and Lua (internal.xml.decode). Needed for #7311 NO_DOC=internal NO_CHANGELOG=internal
-
Mergen Imeev authored
This patch limits the amount of allocated memory in the built-in REPLACE() function. Follow-up tarantool/security#119 NO_DOC=bugfix NO_CHANGELOG=already exists
-
- Apr 14, 2023
-
-
Andrey Saranchin authored
Function tuple_extract_key_raw for nullable partially sequential key_def can extract wrong key from tuples without trailing nils. Fortunately, it does not affect tarantool - tuple_extract_key_raw is used only with cmp_def, which ends with non-nullable primary key definition, hence contains no trailing nils. Closes #8504 NO_CHANGELOG=no visible changes NO_DOC=no visible changes
-
Gleb Kashkin authored
For an unknown reason default fio.open() mode used to be set as 0777 & umask that basically equals 18, meaning no read/write/execute rights for anyone. Now the default is 0666 before umask, meaning read and write access. Closes #7981 NO_DOC=bugfix
-
- Apr 13, 2023
-
-
Yaroslav Lobankov authored
Provide the `report-job-status` action with the `job-name` param to get the direct link to the failed job in the failure message. NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci
-
Yaroslav Lobankov authored
Call the `checkout` action with the `path` param to avoid the following error: Error: File was unable to be removed Error: EACCES: permission denied, unlink '/home/runner/work/tarantool/tarantool/build-out/csv_fuzzer' NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci
-
Yaroslav Lobankov authored
NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci
-
Mikhail Elhimov authored
Closes #8523 NO_DOC=gdb extension NO_TEST=gdb extension NO_CHANGELOG=gdb extension
-
- Apr 12, 2023
-
-
Mergen Imeev authored
This patch introduces the SHOW CREATE TABLE statement. This statement can be used to obtain a description of a space in the form of a corresponding CREATE TABLE and CREATE INDEX statements. Closes #8098 @TarantoolBot document Title: SHOW CREATE TABLE statement Statement can be used to obtain a description of a space in the form of a corresponding `CREATE TABLE` and `CREATE INDEX` statements. Result will be in form of set of statements and set of found errors. If errors were not detected, set of the statements should be enough to completely serialize space definition. There is two types of `SHOW CREATE TABLE` statement: 1) Get a description of a single space: ``` SHOW CREATE TABLE table_name; ``` This statement can be used to obtain a description of a space in the form of the corresponding `CREATE TABLE` and `CREATE INDEX` statements. The result will be in the form of a set of statements and a set of found errors. If no errors are found, the set of statements should be sufficient to fully serialize the space definition. Otherwise, it will certainly not be a complete space definition, and a `CREATE TABLE` statement is generally not guaranteed to be syntactically correct. 2) Get descriptions of all available non-system spaces: ``` SHOW CREATE TABLE; ``` This statement returns descriptions for each available non-system space in the form described above.
-
Mergen Imeev authored
In some cases we need to convert a string to upper case (e.g., when normalizing a lower-case field name for SQL): add helper functions that do this in-place or by creating a copy of the original string. Needed for #8098 NO_DOC=internal NO_CHANGELOG=internal
-
Yaroslav Lobankov authored
We have the limited hardware resources with macOS 12, and full testing is time-consuming. So let's check only the release build on the x86_64 platform. NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci
-
Yaroslav Lobankov authored
All tests were updated according to tarantool/luatest@930b63b. So this should resolve the problem with Unix socket collisions that we tried to fix, for example, in tarantool/tarantool@7ac2685. NO_DOC=testing stuff NO_TEST=testing stuff NO_CHANGELOG=testing stuff
-
Yaroslav Lobankov authored
Bump test-run to new version with the following improvements: - Properly ignore Unix sockets on artifact saving [1] - Bump luatest to 0.5.7-34-g930b63b [2] [1] tarantool/test-run@3afaccc [2] tarantool/test-run@02c4828 NO_DOC=testing stuff NO_TEST=testing stuff NO_CHANGELOG=testing stuff
-
Yaroslav Lobankov authored
This reverts commit 7ac2685b. NO_DOC=testing stuff NO_TEST=testing stuff NO_CHANGELOG=testing stuff
-
Pavel Semyonov authored
NO_CHANGELOG=changelog NO_DOC=changelog NO_TEST=changelog
-
- Apr 11, 2023
-
-
Timur Safin authored
Refactor the way how we run various debugger scenarios, getting rid of external static file, and producing debuggee scripts on the fly. The idea is to have everything in the single source: both source script to be used for debugging, and corresponding debugger commands. NO_DOC=internal NO_CHANGELOG=internal
-
Timur Safin authored
It's frequently needed to see interaction of a luatest script and its chield launched via popen. Now we display extra debugging information received from children pipes directly to the parent screen. It's hidden by default by luatest (if everything goes well), but could be displayed with `luatest -c` option. ``` luatest -c -v app-luatest/console_debugger_session_test.lua ``` NO_DOC=internal NO_CHANGELOG=internal
-
- Apr 10, 2023
-
-
Georgy Moiseev authored
NO_DOC=Test update NO_CHANGELOG=Test update
-
Georgy Moiseev authored
Rework "running tests with built-in package" assert since now checks is a callable table package with subpackages instead of a single function. NO_DOC=No tagged version since checks initial embedding NO_CHANGELOG=No tagged version since checks initial embedding
-
Mergen Imeev authored
This patch replaces the type for some int and uint32_t values with size_t to avoid problems with integer overflow. Closes tarantool/security#119 NO_DOC=bugfix
-
- Apr 07, 2023
-
-
Yaroslav Lobankov authored
Skip unstable tests of `replication-luatest/linearizable_test.lua` due to tarantool-qa#277. NO_DOC=testing stuff NO_TEST=testing stuff NO_CHANGELOG=testing stuff
-
Yaroslav Lobankov authored
The fixed tests often failed with fail | 2023-03-01 15:54:30.550 [3724975] main/103/server_instance.lua F> can't initialize storage: unlink, called on fd 63, aka unix/:(socket), peer of unix/:(socket): Address already in use We fixed a similar issue in commit 3d3e9dea ("test: fix flaky box-luatest/gh_7917_log_row_on_recovery_error_test") by using unique instance names. Let's do the same here. NO_DOC=testing stuff NO_TEST=testing stuff NO_CHANGELOG=testing stuff
-
Oleg Chaplashkin authored
Server API from the luatest has been changed: `server:clean()` method has been removed. Use `server:drop()` instead. Follows up tarantool/luatest#296 NO_DOC=test fix NO_TEST=test fix NO_CHANGELOG=test fix
-
Oleg Chaplashkin authored
Bump test-run to new version with the following improvements: - Bump luatest to 0.5.7-33-g8523e5c [1] [1] tarantool/test-run@7db594d Part of tarantool/luatest#296 NO_DOC=testing stuff NO_TEST=testing stuff NO_CHANGELOG=testing stuff
-
Mergen Imeev authored
Tuples that have been inserted into system spaces after the _space definition has been inserted into _space have the same format as the space into which they were inserted. However, previously inserted tuples have an incomplete tuple format with parts missing. One piece that is missing information is the JSON token, which is used to determine the number of fields. The tarantoolsqlIdxKeyCompare() function contains the correct checks for the case when the number of fields from the format is equal to or less than the fieldno field, but uses tuple_format_field() before this check, resulting in an assertion. This patch forces tarantoolsqlIdxKeyCompare() to call tuple_format_field() only after checking that fieldno is less than field_count. Closes #8418 NO_DOC=Bugfix in debug.
-
- Apr 06, 2023
-
-
Vladimir Davydov authored
This may result in invalid statistics if there's more than 4 GB allocated for index extents. Fixes commit a75f4b7e ("memtx: introduce read view statistics"). Follow-up #8501 Coverity report 1537026, 1537027. NO_DOC=bug fix NO_CHANGELOG=unreleased NO_TEST=complicated; checked by coverity
-
Vladimir Davydov authored
Allow to register tweaks for variables of type double. Such tweak can be set to any integer or double value. Follow-up #7883 NO_DOC=internal NO_TEST=internal NO_CHANGELOG=internal
-
- Apr 05, 2023
-
-
Kirill Yukhin authored
To make changelog preparation less stressful let's pass each and every change to changelogs/ directly through the doc team. NO_CHANGELOG=no code changes NO_TEST=no code changes NO_DOC=no code changes
-
Kseniia Antonova authored
Fix grammar, punctuation, and wording NO_CHANGELOG=changelog NO_DOC=changelog NO_TEST=changelog
-
Yaroslav Lobankov authored
* Add an extra step that should be considered as a workaround for the runner agent (ChristopherHX/github-act-runner) that is used on FreeBSD machines. Without it, env.ARTIFACT_EXISTS will be undefined for some reason. * In the s3-upload-artifact action change `if: env.ARTIFACT_EXISTS` to `if: env.ARTIFACT_EXISTS == 'true'` to be compatible with the FreeBSD runner agent. Follows up tarantool/multivac#116 NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci
-
Serge Petrenko authored
Add a new possible value for `bootstrap_strategy` configuration option - "config". When bootstrap_strategy is "config", the user may use `bootstrap_leader` configuration option to specify the URI or UUID of the desired bootstrap leader. Closes #7999 @TarantoolBot document Title: new configuration option - `bootstrap_leader`. Configuration receives a new parameter - `bootstrap_leader`. The parameter specifies the desired node to bootstrap from. The parameter is valid only when another option - `bootstrap_strategy` - is set to `'config'`. The user may pass either the bootstrap leader's URI or its UUID string. If bootstrap leader is passed as a UUID, the node will bootstrap from the peer whose UUID matches the given one. If bootstrap leader is passed as a URI, the URI must contain the same host:port pair (or unix socket path) used for this node in `box.cfg.replication`. In this case the node will bootstrap from the remote peer listed in the corresponding replication entry. For example, this call will return an error: ```lua box.cfg{ bootstrap_strategy = 'config', bootstrap_leader = 'localhost:3301', replication = {'127.0.0.1:3301'}, } ``` But this call will succeed: ```lua box.cfg{ bootstrap_strategy = 'config', bootstrap_leader = 127.0.0.1:3301', replication = {'127.0.0.1:3301'}, } ``` In the example above, setting either or both of `bootstrap_leader` and `replication` to `"user:password@127.0.0.1:3301` will work just fine, i.e. only the bootstrap leader's host and port are matched against replication entries. If `bootstrap_leader` points at the instance being configured, the same URI entry for the instance must still be present in `replication` configuration parameter, like this: ```lua box.cfg{ listen = 'localhost:1234', bootstrap_leader = 'localhost:1234', replication = {'localhost:1234', ...}, } ``` The only exception to this is setting `bootstrap_leader` to the same UUID as instance_uuid, like this: ```lua box.cfg{ listen = 'something', bootstrap_leader = '11111111-1111-1111-1111-111111111111', instance_uuid = '11111111-1111-1111-1111-111111111111', ``` In this case the node will bootstrap the cluster on its own.
-
Serge Petrenko authored
The test will include test cases for other possible bootstrap strategies, so rename it properly. Doing this in a separate commit helps to minimize the diff. In-scope-of #7999 NO_DOC=test rename NO_TEST=test rename NO_CHANGELOG=test rename
-
Serge Petrenko authored
replicaset_connect() sleeps in a loop while waiting for the connections to be established and checks a bunch of conditions in between the loop cycles to check if it can proceed (with either a success or a failure). The conditions are already quite complicated and multiple, but it's going to get worse with the addition of bootstrap_strategy "config" and "supervised": during bootstrap replicaset_connect() will proceed as soon as the configured bootstrap leader is connected. Factor all these checks out to a helper function for simplicity. Part-of #7999 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
Serge Petrenko authored
Add uri_is_nil() and uri_addr_is_equal() helpers. In-scope-of #7999 NO_DOC=not user-visible NO_TEST=tested implicitly in the next commit NO_CHANGELOG=not user-visible
-
Serge Petrenko authored
Some time ago we decided that new checkers added to box_check_config() shouldn't throw. Instead they return -1 and box_check_config() raises an error. box_check_uuid() will be used in one of the upcoming checkers, so make it return -1 and set diag in case of error. Since it's used by box_check_instance_uuid() and box_check_replicaset_uuid(), fix them as well. In-scope-of #7999 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
Serge Petrenko authored
Checking a single uri will be needed in upcoming commits. In-scope-of #7999 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-