- May 25, 2023
-
-
Yaroslav Lobankov authored
Bump the metrics submodule to 1.0.0 version. NO_DOC=submodule bump NO_TEST=submodule bump NO_CHANGELOG=submodule bump (cherry picked from commit 8bbc73ce)
-
Yaroslav Lobankov authored
Bump test-run to new version with the following improvements: - lib: propagate test status 'skip' [1] - Show overall progress while running [2] - Follow test timeout for luatest [3] - Run luatest test by pattern [4] - Refactor command to run luatest test [5] - Bump luatest to 0.5.7-39-g89da427 [6] - consistent mode: fix worker's vardir calculation [7] [1] tarantool/test-run@6fbb7fd [2] tarantool/test-run@c5fa909 [3] tarantool/test-run@f67d523 [4] tarantool/test-run@264af05 [5] tarantool/test-run@e19bb11 [6] tarantool/test-run@3e74192 [7] tarantool/test-run@aac77f5 NO_DOC=testing stuff NO_TEST=testing stuff NO_CHANGELOG=testing stuff (cherry picked from commit 252865ce)
-
Nikolay Shirokovskiy authored
Currently on tuple encoding failure we raise Lua error. In many placess the error is not handled in Lua C code and we get misc leaks. Let's instead pass error as return value. Note that generally speaking encoding code can raise an error on OOM. Which will lead to leak again. Hopefully application will be killed by OOM killer instead. Other then that we expect no more errors in the code. If code calls a user defined callback then pcall is used (see lua_field_inspect_ucdata for example). So the turn from raising errors to returning error code seems the right direction. Closes #7939 NO_DOC=bugfix (cherry picked from commit 9f9142d6)
-
Nikolay Shirokovskiy authored
This will bring new ibuf_truncate method. Part of #7939 NO_TEST=internal NO_CHANGELOG=internal NO_DOC=internal (cherry picked from commit 45c9a096)
-
Vladimir Davydov authored
This commit pulls matras statistics. Needed for https://github.com/tarantool/tarantool-ee/issues/143 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring (cherry picked from commit 1ea236e7)
-
- May 24, 2023
-
-
Igor Munkin authored
* LJ_GC64: Make ASMREF_L references 64 bit. * lldb: introduce luajit-lldb * x64/LJ_GC64: Fix emit_rma(). * Limit path length passed to C library loader. Part of #4808 Part of #8069 Part of #8516 NO_DOC=LuaJIT submodule bump NO_TEST=LuaJIT submodule bump
-
Ilya Verbin authored
Currently is_nullable property of a functional index part disables the unique property of the index. The bug is in func_index_compare(), which compares functional keys first, and if they are equal it compares the primary keys. This behaviour is correct only when some part of the key is NULL (and for non-unique indexes), but for now the primary keys are compared unconditionally. Fix this by checking for NULL key parts. Closes #8587 NO_DOC=bugfix (cherry picked from commit 6bcd51f9)
-
- May 23, 2023
-
-
Mergen Imeev authored
This patch adds a check that sqlXPrintf() does not fail in the built-in SQL function printf(). There are two possible problems: the result might get too large, or there might be an integer overflow because internally int values are converted to size_t. Closes #tarantool/security#122 NO_DOC=bugfix (cherry picked from commit 13159230)
-
Mergen Imeev authored
This patch fixes problems with INSERT INTO ... SELECT FROM optimization. These problems appeared after 6b8acd8f, where the check became redundant, but was not updated. Two problems arose: 1) an assertion or segmentation fault when optimization was used and the source space does not have an index; 2) optimization can be used even if the indexes are incompatible. The second problem does not result in changes that are user-visible, so there is no test. Closes #8661 NO_DOC=bugfix (cherry picked from commit 039f714d)
-
- May 16, 2023
-
-
Oleg Babin authored
Sometimes we need negative timestamps to work with dates before 1970. But seems such cases were even covered in tests. So there wasn't any handling of negative timestamps with fraction part. Such datetime objects had incorrect string representation (e.g. "1963-11-22T12:30:02.-999"). This patch fixes it. Closes #8570 NO_DOC=bugfix (cherry picked from commit 8e7514b9)
-
Oleg Babin authored
Seems that problem code part was ported from Lua as is. But there is some difference between modulo operator in C and in Lua. Lua always returns positive value but in C result could be negavive. This difference led to the case when after subtraction nsec part of datetime object become negative that yielded weird result on attempt to get string representation (e.g."2008-02-03T03:36:43.-100Z"). This patch fixes it. Part of #8570 NO_DOC=bugfix NO_CHANGELOG=see next commit (cherry picked from commit a9c7639a)
-
- May 15, 2023
-
-
Andrey Saranchin authored
Currently, to export IPROTO constants to Lua, we define a translation table in C manually. As a result, some constants are forgotten and some are exported with mistakes. Fortunately, we have a mechanism to generate enums and its stringified names in compile-time. Let's rewrite iproto constants using such mechanism and generate translation table automatically. Closes #8443 Closes #8574 Closes #8577 NO_DOC=bugfix (cherry picked from commit b3fb883b)
-
Andrey Saranchin authored
We are going to generate iproto_key enum automatically to generate iproto constants for Lua as well. This mechanism generates *_MAX constant for enum using its name, which is in lower case. So let's convert IPROTO_KEY_MAX to form which is appropriate for enum generator. Part of #8443 NO_TEST=rename constant NO_CHANGELOG=internal NO_DOC=internal (cherry picked from commit 82474b46)
-
Oleg Babin authored
This patch fixes a case when timestamp is passed to datetime.set function at the same time with nsec, usec or msec. It works fine for datetime.new but some logic was missed for set function. Here we fix that and introduce a test. Closes #8583 NO_DOC=bugfix (cherry picked from commit e0855097)
-
Vladimir Davydov authored
With MVCC off (box.cfg.memtx_use_mvcc_engine = false), a memtx space read view may include a dirty (not committed to WAL) record. To prevent such records from being written to a snapshot, we sync WAL after creating a read view for a snapshot. The problem is that it doesn't work for long (yielding) DDL operations, such as building a new index, because such operations yield before waiting on WAL. As a result, a dirty DDL record may make it to a snapshot even though it may fail eventually. To fix that, let's keep track of all yielding DDL statements and exclude them from a read view using the memtx snapshot cleaner. Closes #8530 NO_DOC=bug fix (cherry picked from commit a532e375)
-
Vladimir Davydov authored
We don't use this functionality in net.box (sync number is always 0 for all watch/event packets), but other clients may actually use it. Closes #8393 @TarantoolBot document Title: Document that `IPROTO_EVENT` has sync number Initially the sync number sent by a client in an `IPROTO_WATCH` request was ignored and `IPROTO_EVENT` packet didn't have a sync number. There were complaints about it from users so we consider this to be a bug. Now the server sends the same sync number in an `IPROTO_EVENT` packet as the one sent by the client in the last corresponding `IPROTO_WATCH` request. (cherry picked from commit 99389ac6)
-
- May 11, 2023
-
-
Sergey Ostanevich authored
Add necessary wait for replication to appear on the replica, enforce correct txn isolation to avoid memtx/vinyl discrepancy. Remove the test from the fragile list. Closes tarantool/tarantool-qa#292 NO_DOC=test fix NO_CHANGELOG=test fix (cherry picked from commit 3a220dad)
-
- May 05, 2023
-
-
Sergey Bronnikov authored
According to libFuzzer documentation [1] backslash should be escaped. 1. https://llvm.org/docs/LibFuzzer.html#dictionaries ``` $ swim_proto_meta_fuzzer -dict=swim_proto_meta_fuzzer.dict ParseDictionaryFile: error in line 1 "\001\000\000\004" $ swim_proto_member_fuzzer -dict=swim_proto_member_fuzzer.dict ParseDictionaryFile: error in line 1 "\022\000\000\000\000\000\000\000" ``` NO_CHANGELOG=internal NO_DOC=internal NO_TEST=internal (cherry picked from commit 62d03f15)
-
- May 02, 2023
-
-
Gleb Kashkin authored
All box.cfg options values used to be plain values or arrays. Now some options contain key-value or nested tables. This patch allows all such options to be set through environment variables too. Closes #8494 Closes #8051 @TarantoolBot document Title: Set box.cfg table value via env vars This patch implements a way to set tables as box.cfg options value in two different ways: * as plain key-value table: ``` bash> export TT_LOG_MODULES=aaa=info,bbb=error && ./tarantool Tarantool 2.10.0-beta1-1977-g2970bd57a type 'help' for interactive help tarantool> box.cfg{} ... 2023-04-11 07:22:10.951 [219020] main/103/interactive/box.load_cfg I> set \ 'log_modules' configuration option to {"aaa":"info","bbb":"error"} --- ... tarantool> box.cfg.log_modules.aaa --- - info ... tarantool> box.cfg.log_modules.bbb --- - error ... ``` * as a table in json encoding (important: don't forget to put env var value into single quotes): NO_WRAP ``` bash> export TT_METRICS='{"labels":{"alias":"mystorage"},"include":"all","exclude":["vinyl"]}' && ./tarantool Tarantool 2.10.0-beta1-1977-g2970bd57a type 'help' for interactive help tarantool> box.cfg{} ... 2023-04-11 07:26:03.635 [219288] main/103/interactive/box.load_cfg I> set \ 'metrics' configuration option to {"exclude":["vinyl"],"include":"all",\ "labels":{"alias":"mystorage"}} --- ... tarantool> box.cfg.metrics.include --- - all ... ``` NO_WRAP (cherry picked from commit cd58c321)
-
- Apr 27, 2023
-
-
Vladimir Davydov authored
An autoconf-generated configure script doesn't enable compiler optimization flags if CFLAGS / CXXFLAGS options are set explicitly. We started setting CFLAGS / CXXFLAGS in commit e6abe1c9 ("cmake: add extra security compiler options"). As a result, users started experiencing performance degradation issues, like the one described in tarantool/tarantool-ee#440. Let's set -O2 in CFLAGS / CXXFLAGS explicitly to fix that. Closes #8606 Needed for tarantool/tarantool-ee#440 NO_DOC=build NO_TEST=build (cherry picked from commit 52f6ed4d)
-
- Apr 26, 2023
-
-
Serge Petrenko authored
The test flaked a lot on FreeBSD and Mac OS due to some proxy problems which were fixed in scope of tarantool/luatest@5b704ac. Another possible failure looked like this: NO_WRAP [006] not ok 5 linearizable-read.test_leader_change [006] # Can't modify data on a read-only instance - it is an orphan [006] # stack traceback: [006] # ...tarantool/test/replication-luatest/linearizable_test.lua:196: in function 'linearizable-read.test_leader_change' [006] # ... [006] # [C]: in function 'xpcall' NO_WRAP Fix it by waiting for the server to follow its upstreams. Closes tarantool/tarantool-qa#277 NO_DOC=test fix NO_CHANGELOG=test fix (cherry picked from commit b71fa1a7)
-
- Apr 25, 2023
-
-
Mergen Imeev authored
The netbox_transport_send_and_recv() function takes a part of the response size as a parameter, and it is possible that the resulting size could become larger than SIZE_MAX, resulting in an integer overflow and a segmentation fault. Closes #tarantool/security#121 NO_DOC=bugfix (cherry picked from commit 5ce31144)
-
- Apr 24, 2023
-
-
Nikita Zheleztsov authored
Currently on applier death `is_candidate` is updated after trying to start election. So, raft assumes it has healthy quorum and bumps term even when there's not enough healthy nodes to do that. Trigger on updating above-mentioned flag is run in `replicaset_on_health_change`. So, let's move it before executing `raft_notify_is_leader_seen`, which tries to start election. Closes #8433 NO_DOC=bugfix (cherry picked from commit f077ebf6)
-
- Apr 22, 2023
-
-
Vladimir Davydov authored
Appliers array and count are captured by value before initialization. As a results, appliers won't be freed if replication configuration fails. NO_DOC=bug fix NO_CHANGELOG=minor NO_TEST=should be checked by ASAN, see #7326 (cherry picked from commit b56a7ead)
-
- Apr 21, 2023
-
-
Oleg Chaplashkin authored
Bump test-run to new version with the following improvements: - Bump luatest to 0.5.7-38-ge6a2093 [1] [1] tarantool/test-run@affa13f NO_DOC=testing stuff NO_TEST=testing stuff NO_CHANGELOG=testing stuff (cherry picked from commit c5f5ee0d)
-
- 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 (cherry picked from commit 19b53ac3)
-
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 (cherry picked from commit d34a0cbc)
-
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 (cherry picked from commit 5f596b25)
-
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 (cherry picked from commit be3034ab)
-
- 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 (cherry picked from commit e3f896d3)
-
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 (cherry picked from commit fe5785bb)
-
Yaroslav Lobankov authored
NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci (cherry picked from commit 7148004f)
-
- Apr 12, 2023
-
-
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 (cherry picked from commit 2f1ae906)
-
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 (cherry picked from commit 0e7e76e6)
-
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 (cherry picked from commit e6677b2c)
-
Yaroslav Lobankov authored
This reverts commit 79fe6adc. 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 10, 2023
-
-
Georgy Moiseev authored
NO_DOC=Test update NO_CHANGELOG=Test update (cherry picked from commit 22d7636b)
-
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 (cherry picked from commit a8bc6312)
-
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 (cherry picked from commit 60a187d7)
-