- Mar 24, 2022
-
-
Aleksandr Lyapunov authored
tuple_format_new has lots of arguments, all of them necessary indeed. But a small analysss showed that almost always there are only two kinds of usage of that function: with lots of zeros as arguments and lots of values taken from space_def. Make two versions of tuple_format_new: simple_tuple_format_new, with all those zeros omitted, and space_tuple_format_new, that takes space_def as an argument. NO_DOC=refactoring NO_CHANGELOG=refactoring
-
Aleksandr Lyapunov authored
Introduce field constraints - limitaions for particular fields. Each constraint must refer to a function in _func space. For the first step we expect lua functions with body there. Field constraint checks are very close to field type checks, so it's natural to implement them in tuple formats. On the other hand tuple formats belong to tuple library, that does not include functions (func.h/c etc), so constraints are split into two parts: - a part in tuple library that implements arbitrary constraints with pointers to functions that actually check constraints. - a part in box library which uses the part above, sets particular check functions and handles alter etc. There are two not-so-obvious problems that are solved here: - Functions in _func space must be preserved while used by such constraints. Func pinning is used for this purpose. - During initial recovery constraits are created before _func space recovery, so we have to pospone constraint initialization. One can set up constraint for any field in tuple format with one or several functions that must be present in _func space: space:format{name='a', constraint='func1'} space:format{name='a', constraint={name1='func1'}} space:format{name='a', constraint={name1='func1', name2='func2'}} So constraint(s) can be set by one function name or by lua table with function name values. Each consraints has a name that can be specified directly (with string key in table) or imlicitly set to the name of function. The check function receives two arguments: the checking value and the name of the constraint. Also the name of the failed constraint is present in raised exception. The only way to pass the constraint is to return true from its function. All other values and exception are treated as failure (exeptions are also logged). NO_DOC=see later commits NO_CHANGELOG=see later commits
-
Aleksandr Lyapunov authored
Now C port allows to add a tuple or raw msgpack to it. Add another function that encodes and appends given string. NO_DOC=refactoring NO_CHANGELOG=refactoring NO_TEST=refactoring
-
Aleksandr Lyapunov authored
gpr_alloc is a small library that is designed for simplification of allocation of several objects in one memory block. It could be anything, but special attention is given to string objects, that are arrays of chars. Typical usage consist of two phases: gathering total needed size of memory block and creation of objects in given block. NO_DOC=refactoring NO_CHANGELOG=refactoring
-
Aleksandr Lyapunov authored
There's several important stages of recovery of database: loading from snapshot, then loading from WAL(s) and then normal operation. Introduce a global recovery state that shows this stage. Note that there's already a recovery state in memtx engine which is very close but still different to the new introduced state. That state in memtx is a private property of memtx that internally shows initialization status of memtx spaces and indexes. Memtx can set the value for convenience' sake, for example it can jump directly to MEMTX_OK before snapshot loading in case of force recovert. NO_DOC=refactoring NO_CHANGELOG=refactoring NO_TEST=refactoring
-
Aleksandr Lyapunov authored
opt_def is an option parser from msgpack by given scheme. The scheme consists of set of predefined types that the parser can handle (something like int, enum, str). The problen is that those predefined types must be generic, but there are cases when a specific unusual must be parsed. This patch introduces OPT_CUSTOM type that uses arbitrary function callback and can be used for any non-generic option value. NO_DOC=refactoring NO_CHANGELOG=refactoring NO_TEST=refactoring
-
Aleksandr Lyapunov authored
There are cases when we need to be sure that a function is not deleted and/or removed from func cache. For example constraints: they must hold a pointer to struct func while it's very hard to determine whether there'a constraint that points to given func. Implement func pin/unpin for this purpose. You can pin a func to declare that the func must not be deleted. To have to unpin it when the func is not needed anymore. NO_DOC=refactoring NO_CHANGELOG=refactoring
-
Aleksandr Lyapunov authored
- Use uint32_t for string length. Actually internally it cannot take more that INT_MAX length, so uin32_t is enough. This change makes the hash table a bit more compact. - Rename mh_strnptr_find_inp -> mh_strnptr_find_str. I beleive it makes it more understandable. NO_DOC=refactoring NO_CHANGELOG=refactoring NO_TEST=refactoring
-
Aleksandr Lyapunov authored
I'm going to extend func cache API so it should be separated. A couple of comments added. No logical changes. NO_DOC=refactoring NO_CHANGELOG=refactoring NO_TEST=refactoring
-
Aleksandr Lyapunov authored
Fill port with a corrupted data in debug (TRASH it) in order to detect double port destruction early. Add a comment for func_call function that describes what states of ports are expected before and after func_call. Fix port usage in lua using ffi - allocate a full port structure instead of a (bit smaller) structure port_c. That makes any port structure to have fixed determined size which in turn makes safe to cast and use different port types. NO_DOC=refactoring NO_CHANGELOG=refactoring NO_TEST=refactoring
-
Aleksandr Lyapunov authored
There must be a normal code flow: if you want to initialize some structure you should set members you want to and set with defaults the rest members. Such a code flow would be durable when some new members are added to the struct. Make field_def structure to comply those rules. NO_DOC=refactoring NO_CHANGELOG=refactoring NO_TEST=refactoring
-
Aleksandr Lyapunov authored
It seems that is was simply forgotten. NO_DOC=refactoring NO_CHANGELOG=refactoring NO_TEST=refactoring
-
Aleksandr Lyapunov authored
Some non-important fixes that are not related to any issue. NO_DOC=refactoring NO_CHANGELOG=refactoring
-
Aleksandr Lyapunov authored
fselect is designed to make selects results in console better readable for human eyes. The usage is expected to be rare and by developers only so there's no performance requirements. Now the API of fselect is: s:fselect(<key>, <select+fselect option map>, <fselect option map>) But sometimes there are cases when only some columns are needed for analysis, while all other columns consume space on screen. So make an option in fselect that allows to choose which columns to output (like some other databases allows). Add an option 'columns' in fselect options along with other its options with list of columns (by number or name). Allow lua tables and comma-separated-strings for that. If options argument in fselect is string, interpret is as columns options. NO_DOC=There's no doc about fselect yet, I'll append these change to the existing doc ticket NO_CHANGELOG=minor changes in minor feature
-
- Mar 23, 2022
-
-
mechanik20051988 authored
We should link box_test_utils to tuple perf test to prevent this error. Follow up #2717 NO_CHANGELOG=build fix NO_DOC=build fix NO_TEST=build fix
-
- Mar 21, 2022
-
-
Kirill Yukhin authored
Added 290 sec. timeout for starting tarantool server. NO_DOC=ci NO_CHANGELOG=ci NO_TEST=ci
-
Kirill Yukhin authored
Bump test-run to new version with the following improvements: - Add timeout for starting tarantool server (tarantool/test-run#302) - Kill hanging processes of not started servers (tarantool/test-run#332) - Rerun all failed tests, not only marked as fragile (tarantool/test-run#329) NO_DOC=testing NO_TEST=testing NO_CHANGELOG=testing
-
Kirill Yukhin authored
Running of luacheck against test-run submodule is redundant. Add dedicated bypass to .luacheckrc. NO_DOC=ci NO_CHANGELOG=ci NO_TEST=ci
-
- Mar 18, 2022
-
-
Georgiy Lebedev authored
Investigation of GNU libunwind problems on the aarch64-linux-gnu platform drive us to the conclusion that libunwind-1.2.1 provided by major distribution packages is broken. Not to mention that its test suite fails with SEGFAULTs. Last but not least, some distributions, e.g. CentOS 8 (see #4611) do not provide a libunwind package. Hence, bundle libunwind: bundling is enabled by default on all platforms, except for macOS — a system package can be used if its version is greater or equal than 1.3.0 (minimal version that does not seem to be broken on aarch64-linux-gnu). * Add new submodule: bump it to current master. * Refactor libunwind package search logic out of compiler.cmake. * Add CMake script for building bundled libunwind. * Add CMake script for extracting version of libunwind. * Re-enable backtrace for all RHEL distributions by default. * Remove libunwind from static build. Needed for #4002 Closes #4611 NO_DOC=build system NO_TEST=build system
-
Yaroslav Lobankov authored
It looks like we just missed the fuzzing.yml workflow when worked on adding this feature to our CI process in #6446. Follows up tarantool/tarantool-qa#100 NO_DOC=ci NO_CHANGELOG=ci NO_TEST=ci
-
Yaroslav Lobankov authored
It looks like this trigger was added beforehand for some purposes but never used. So there is no sense to keep it in our workflows. NO_DOC=ci NO_CHANGELOG=ci NO_TEST=ci
-
Yaroslav Lobankov authored
We have recently moved all development from local branches to forks and disabled running workflows in forks. So there is no sense to keep logic for running full testing in forks if a branch has the 'full-ci' suffix. NO_DOC=ci NO_CHANGELOG=ci NO_TEST=ci
-
Yaroslav Lobankov authored
We have recently moved all development from local branches to forks. Most workflows cannot be run in forks because many of them need access to private runners and/or secrets. Workflows in forks can be disabled manually, but it's hard to remember and it needs an extra action from a developer. Instead, we can detect the repo in workflows and run them if the repo is tarantool/tarantool. Closes #6913 NO_DOC=ci NO_CHANGELOG=ci NO_TEST=ci
-
AnastasMIPT authored
Information messages have been moved from the critical logging level to info to avoid false alarms when reading logs. NO_DOC=commit does not add any new visible functionality NO_TEST=testing will require more resources than the result it will bring
-
Sergey Ostanevich authored
Added support to netbox's `stream` and `future` objects using the __autocomplete metamethod. Closes #6305 NO_DOC=internal
-
Sergey Ostanevich authored
This patch updates the logic in lua_rl_complete() where __index from a metatable apparently expected to be a table, not a function. It is rather simple for a table object, but some of them are userdata, so an __autocomplete method is introduced to be sure it returns a table with all names suitable for tabcompletion. Part of #6305 NO_DOC=internal NO_CHANGELOG=part of a fix
-
- Mar 17, 2022
-
-
Vladimir Davydov authored
When the deferred DELETE optimization was introduced, it was enabled for all Vinyl spaces. Though the optimization should improve write performance, at the same time it may result in significant degradation of reads. Let's disable this optimization by default and add a space option to enable it. Closes #4501 @TarantoolBot document Title: Document defer_deletes space option The new option is a boolean flag that only makes sense for Vinyl spaces that have secondary indexes. Setting the flag results in deferring generation of DELETE statements for secondary indexes till compaction of the primary index. It should speed up writes, because it eliminates a lookup in the space for REPLACE and DELETE operations. At the same time, it may result in degradation of reads from secondary indexes, because it entails an additional lookup in the primary index per each "phantom" tuple (a tuple that was deleted in the primary index, but not yet in the secondary index, and hence should be skipped on read). Example: ```lua box.schema.space.create('test', { engine = 'vinyl', defer_deletes = true, }) ``` If omitted on space creation, this option is set to the value of `box.cfg.vinyl_defer_deletes`, which is false by default.
-
vr009 authored
Tarantool console quits if you type Ctrl+C. This patch fixes console behavior on sending SIGINT. Console discards the current input on typing Ctrl+C and invites user to the new line. In daemon mode the process will exit after receiving SIGINT. Test gh-2717 should be skipped on release build, cause it uses error injection which is enabled only on debug mode. Fixes #2717 @TarantoolBot document Title: Use Ctrl+C to discard the input in console The signal SIGINT discards the input in console mode. When tarantool executes with -e flag or runs as a daemon, SIGINT kills the process and tarantool complains about it in log.
-
EvgenyMekhanik authored
During DDL operations triggers of old space and new created space are swapped. This leads to crash in case if this swap occurs from space on_replace triggers. This patch banned all DDL operations from on_replace triggers. Closes #6920 @TarantoolBot document Title: Ban DDL operations from space on_replace triggers Previously user can set function for space on_replace trigger, which performs DDL operation. This may leads to tarantool crash, that's why this patch bans DDL operations from on_replace triggers. All this operations fails with error: "Space on_replace trigger does not support DDL operations".
-
- Mar 16, 2022
-
-
Mergen Imeev authored
This patch fixes an assertion or segmentation fault when getting the value of MP_EXT via netbox. Closes #6766 NO_DOC=Bugfix
-
- Mar 15, 2022
-
-
AnastasMIPT authored
netbox_perform_request throws a general ClientError exception on time-out error: it should throw the more suitable and POSIX-compliant TimedOut exception which sets errno to ETIMEDOUT. Closes #6144 NO_DOC=There is no mention of what kind of error is returned on timeout in the net.box documentation.
-
mechanik20051988 authored
There was no zeroing of the number of compressed tuples in the case of space truncation. Also there was no update of compressed tuples count in case of using memtx mvcc engine. This patch fix these problems. Follow up #2695 NO_CHANGELOG=bugfix NO_DOC=bugfix NO_TEST=test in ee version
-
- Mar 14, 2022
-
-
Nick Volynkin authored
Run `docker run` with `--rm` to remove contaners after running a container-based build. These containers are never reused, so there's no reason to keep them. Instead, a new container is created for each build. Not removing them results in wasting disk space on CI runners. NO_DOC=ci NO_CHANGELOG=ci NO_TEST=ci
-
Mergen Imeev authored
Part of #6773 NO_DOC=Doc-request will be added in another commit. NO_CHANGELOG=Changelog will be added in another commit.
-
Mergen Imeev authored
This patch introduces basic DATETIME support in SQL. After this patch, it will be allowed to select DATETIME values from spaces, insert them into spaces, and use them in functions. CAST() from DATETIME to STRING, SCALAR and ANY is also supported. Part of #6773 NO_DOC=Doc-request will be added in another commit. NO_CHANGELOG=Changelog will be added in another commit.
-
Vladimir Davydov authored
NO_CHANGELOG=feature was not released Closes #6823 @TarantoolBot document Title: Document msgpack object iterator take_array method The new method copies the given number of msgpack values starting from the iterator cursor position to a new msgpack array object. On success it returns the new msgpack object and advances the iterator cursor. If there isn't enough values to decode, it raises a Lua error and leaves the iterator cursor unchanged. This function could be implemented in Lua like this: ```lua function take_array(iter, count) local array = {} for _ = 1, count do table.insert(array, iter:take()) end return msgpack.object(array) end ``` Usage example: ```lua local mp = msgpack.object({10, 20, 30, 40}) local it = mp:iterator() it:decode_array_header() -- returns 4 it:decode() -- returns 10 local mp2 = it:take_array(2) mp2:decode() -- returns {20, 30} it:decode() -- returns 40 ```
-
- Mar 11, 2022
-
-
Timur Safin authored
Normalization was unnecessary in negative interval values close to 0. This led to extra second in result, like: ``` tarantool> date.now() - date.now() --- - -1.000026000 seconds ... ``` We do need to normalize when assign to datetime values, but not for intermediate intervals. Closes #6882 NO_DOC=bugfix
-
Andrey Saranchin authored
The problem is memtx_tuple_new() says address of memtx_tuple, while memtx_tuple_delete() says address of an actual tuple (part of memtx_tuple). Different addresses in log may be confusing so the patch fixes the problem. Closes #6634 NO_CHANGELOG=no visible changes NO_DOC=no visible changes
-
- Mar 10, 2022
-
-
Vladimir Davydov authored
See https://github.com/tarantool/checkpatch NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci
-
Vladimir Davydov authored
- Remove lz4 from link libraries, because it can be linked via EXTRA_CORE_LINK_LIBRARIES. It'd be more correct, because the open-source doesn't use lz4. Follow-up commit 55f968b4 ("msgpack: add stubs for compressed data support"). - Add OpenSSL include directories unconditionally, because they are used in the open-source build since commit e5ec324d ("Move OpenSSL initialization to lib/core/ssl"). NO_DOC=cmake NO_CHANGELOG=cmake
-