- Aug 31, 2022
-
-
Nikolay Shirokovskiy authored
'public' role and thus guest and any newly created user has 'write' privilege to _collation space. It is not enough to modify _collation as one also needs 'create' privilege to add a collation and 'drop privilege to delete one. So it is safe. Yet looks like we don't have any purpuse of exposing _collation now. NO_DOC=bugfix
-
Nikolay Shirokovskiy authored
Non privileged user (thru public role) has write access to _truncate table in order to be able to perform truncates on it's tables. Normally it should be able to modify records only for the tables he has write access. Yet now due to bootstrap check it is not so. Closes tarantool/security#5 NO_DOC=bugfix
-
Nikolay Shirokovskiy authored
Simple part is a part without any extra key besides 'field' and 'type'. Let's make a check in try_simplify_index_parts itself. NO_TEST=refactoring NO_DOC=refactoring NO_CHANGELOG=refactoring
-
Nikolay Shirokovskiy authored
If index parts are specified using old syntax like: parts = {1, 'number', 2, 'string'}, then (except if parts count is 1) index options set in space format are not taken into account. Solution is to continue after parsing 1.6.0 style parts so to use code that check format options. Closes #7614 NO_DOC=bugfix
-
Alexander Turenko authored
`make api` generates `src/module.h`. `make module_api` is the target for compiling a library for testing of the module API: `test/app-tap/module_api.so`. It depends on the `api` target. Both works for generating `module.h`, but `make api` don't do extra unneeded actions. NO_DOC=Not a user visible change. NO_TEST=It is CI workflow. It would be too strong to test each part of the testing/deployment infrastructure. NO_CHANGELOG=Not a user visible change.
-
- Aug 30, 2022
-
-
Vladimir Davydov authored
- Mix-in EE Lua sources if ENABLE_READ_VIEW is set. - Raise an error on attempt to access box.read_view in CE. Needed for https://github.com/tarantool/tarantool-ee/issues/139 NO_DOC=internal NO_CHANGELOG=internal
-
Vladimir Davydov authored
We need to know space names to export a database read view to Lua. Needed for https://github.com/tarantool/tarantool-ee/issues/139 NO_DOC=internal NO_TEST=ee NO_CHANGELOG=internal
-
Nikita Zheleztsov authored
Currently internal tarantool fibers can be cancelled from the user's app, which can lead to critical errors. Let's mark these fibers as a system ones in order to be sure that they won't be cancelled from the Lua world. Closes #7448 Closes #7473 NO_DOC=minor change
-
Nikita Zheleztsov authored
There are a number of internal system fibers which are not supposed to be cancelled. Let's introduce `FIBER_IS_SYSTEM` flag that will indicate, if the fiber can be explicitly killed. If this flag is set, killing functions will just ignore cancellation request. This commit introduce blocking system fiber cancelling only from the Lua public API, as it is more important to have it right. The prohibition to cancel fibers from C API will be introduced later. Related to #7448 Part of #7473 NO_DOC=internal NO_TEST=will be added in subsequent commit NO_CHANGELOG=internal
-
- Aug 26, 2022
-
-
Yaroslav Lobankov authored
The `ubuntu-18.04` environment is deprecated, so let's switch to `ubuntu-latest` where it is safe. For more details see [1]. [1] https://github.com/actions/virtual-environments/issues/6002 NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci
-
Nikita Pettik authored
Benchmark is implemented using Google Benchmark lib. Here's benchmark settings: - values: we use structure (tuple) containing pointer to heap memory and size (all payload is of the same size - 32 bytes); - keys: unsigned char (first byte in the tuple memory); - hash function: FNV-1a; - value comparator: std::memcmp(); - value count: 10k - 100k - 1M Before each test we prepare vector of tuples storing truly random values. Here's the list of results obtained on my PC (i7-8700 12 X 4600 MHz): Insertions: ~20-12M per second; Find (no misses): ~58-16M* per second (find by key gives the same result); Find (many misses): ~84-30M per second; Iteration with dereference: ~450M per second; Insertions after erase: ~50-17M* per second; Find after erase: ~52-17M* per second (the same as without erase); Delete: ~32-8M* per second. * The first value is for 10k values in hash table; second - is for 1M. Just to have some baseline here results for quite similar benchmark for std::unordered_map (it is also included in source file): Insertions: ~26-8M per second; Find (no misses): ~44-11M per second; Iteration with dereference: ~265-56M per second; Find after erase: ~37-13M per second. Part of #7338 NO_TEST=<Benchmark> NO_DOC=<Benchmark> NO_CHANGELOG=<Benchmark>
-
Nikita Pettik authored
There are a lot of pretty things introduced in 14 standard, so let's use it. NO_DOC=<Build change> NO_TEST=<Build change> NO_CHANGELOG=<Build change>
-
Nikita Pettik authored
It's useful and can be used in all performance tests, so let's move it to a separate header. NO_TEST=<Refactoring> NO_DOC=<Refactoring> NO_CHANGELOG=<Refactoring>
-
Mergen Imeev authored
This patch introduces the SQL_EXPR functions. These functions are SQL functions that consist of only one expression. Currently, the only way to use these functions is as a function in a CHECK constraint, since there is no interface to define the function's arguments. Part of #6986 NO_DOC=will be added later NO_CHANGELOG=will be added later
-
Mergen Imeev authored
This commit introduces a new parse rule for compiling an unresolved single expression. This simplifies the current implementation of sql_expr_compile() and is useful for generating SQL expressions that can be used in the core check constraint. This rule is for internal use only. Part of #6986 NO_DOC=will be added later NO_TEST=refactoring NO_CHANGELOG=will be added later
-
Mergen Imeev authored
This patch introduces get_msgpack() method for port_c. After this patch C-functions could be used for check-constraints. Needed for #6986 NO_DOC=will be added later NO_CHANGELOG=will be added later
-
Mergen Imeev authored
Needed for #6896 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
- Aug 25, 2022
-
-
Aleksandr Lyapunov authored
In commit (35334ca1) qsort was fixed but unfortunately a small typo was introduced. Due to that typo the qsort made its job wrong. Fix the problem and add unit test for qsort. Unfortunately the test right from the issue runs extremely long, so it should go to long-tests. Closes #7605 NO_DOC=bugfix
-
Nikita Pettik authored
It is unused and misleading. Let's remove them so that now we have single entry point for log subsystem - `say()`. NO_DOC=<Refactoring> NO_CHANGELOG=<Refactoring> NO_TEST=<Refactoring>
-
Nikita Pettik authored
Let's introduce on_log_level static variable which is assumed to be configured in `say_set_log_callback()`. on_log_level is assumed to be log level of `log->on_log` callback (i.e. if entry to be logger features higher log level - it is simply skipped). Note that now casual log_level is calculated as MAX(level, on_log_level) since log_level is the single guard for passing execution flow to `log_vsay()` where both things (to be precise on_log callback invocation and ordinary logging) happens. This change is required since if log_level has lower magnitude than on_log_level - on_log callback will be skipped. NO_DOC=<Internal change> NO_TEST=<Internal change> NO_CHANGELOG=<Internal change>
-
Serge Petrenko authored
This patch fixes a number of issues with trigger_clear() while the trigger list is being run: 1) clearing the next-to-be-run trigger doesn't prevent it from being run 2) clearing the next-to-be-run trigger causes an infinite loop or a crash 3) swapping trigger list head before the last trigger is run causes an infinite loop or a crash (see space_swap_triggers() in alter.cc, which had worked all this time by miracle: space _space on_replace trigger swaps its own head during local recovery, and that had only worked because the trigger by luck was the last to run) This is fixed by adding triggers in a separate run list on trigger_run. This list may be iterated by `rlist_shift_entry`, which doesn't suffer from any of the problems mentioned above. While being bad in a number of ways, old approach supported practically unlimited number of concurrent trigger_runs for the same trigger list. The new approach requires the trigger to be in as many run lists as there are concurrent trigger_runs, which results in quite a big refactoring. Add a luatest-based test and a unit test. Closes #4264 NO_DOC=bugfix
-
Serge Petrenko authored
struct trigger is about to get a new field, and it's mandatory that this field is specified in all initializers. Let's introduce a macro to avoid adding every new field to all the initializers and at the same time keep the benefits of static initialization. Also while we're at it fix `lbox_trigger_reset` setting all trigger fileds manually. Part-of #4264 NO_DOC=refactoring NO_CHANGELOG=refactoring NO_TEST=refactoring
-
Serge Petrenko authored
Make trigger_fiber_run return an error, when it occurs, so that the calling code decides how to log it. Also, while I'm at it, simplify trigger_fiber_run's code a bit. In-scope-of #4264 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
Serge Petrenko authored
cord_exit should be always called in the exiting thread. It's a single place to call all the thread-specific module deinitalization routines. In-scope-of #4264 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
Serge Petrenko authored
Unit test compilation with `#define UNIT_TAP_COMPATIBLE 1` might fail with an error complaining that <stdarg.h> is not included. Fix this. In-scope-of #4264 NO_CHANGELOG=testing stuff NO_DOC=testing stuff
-
Serge Petrenko authored
Our triggers support recursive invocation: for example, an on_replace trigger on a space may do a replace in the same space. However, this is not tested and might get broken easily. Let's add a corresponding test. In-scope-of #4264 NO_DOC=testing NO_CHANGELOG=testing
-
Vladimir Davydov authored
We will use it in the read view Lua API. For memtx tree and hash indexes, we add a stub function with a possibility of override if ENABLE_READ_VIEW is set. For the sequence data space, we raise an error if this function is called, because we aren't planning to implement it in the EE repository. Needed for https://github.com/tarantool/tarantool-ee/issues/197 NO_DOC=internal NO_TEST=ee NO_CHANGELOG=internal
-
Vladimir Davydov authored
We aren't planning to support all iterator types for _sequence read views, but once we implement a Lua API for read views, the user will still be able to create a read view of this space. So let's replace the assertions with a graceful error. Needed for https://github.com/tarantool/tarantool-ee/issues/197 NO_DOC=internal NO_TEST=ee NO_CHANGELOG=internal
-
Vladimir Davydov authored
Tuples stored in a read view might not have a format, because we overwrite the tuple format id when we free a tuple. So for anything more sophisticated than a full-scan, we need to use special comparators that don't access the tuple format. To address that, let's provide a way to reset tree and hash key_def if ENABLE_READ_VIEW is defined. The stub functions simply reset the read view key_def to NULL, because it isn't supposed to be used in the CE version. Needed for https://github.com/tarantool/tarantool-ee/issues/197 NO_DOC=internal NO_TEST=ee NO_CHANGELOG=internal
-
Vladimir Davydov authored
For memtx tree and hash indexes: if the ENABLE_READ_VIEW macro is defined, include a source file with the read view iterator implementation instead of defining it directly. We don't need to support any iterator types except ALL in the CE repository, because user read views will be available only in EE. All other iterator types will be defined in the EE repository. We include source files (not headers), because to implement a read view iterator, we need access to index internals, which are defined in memtx_hash.cc and memtx_tree.cc. The included implementation source file is supposed to define the {tree,hash}_read_view_iterator_start function, which positions the iterator to the given key. It's called directly by create_iteartor index read view method. For the memtx tree index, the iterator implementation needs to know the iteration key (for handling EQ/REQ requests) so we also add the key to the iterator struct in this commit. Needed for https://github.com/tarantool/tarantool-ee/issues/197 NO_DOC=internal NO_TEST=ee NO_CHANGELOG=internal
-
Vladimir Davydov authored
We can't return tuples retrieved from a consistent index read view as is. We need to filter out dirty tuples and decompress compressed tuples. Let's introduce a helper function for this. Currently, this helper function is used only in the ALL iterator implementation of the tree and hash indexes. Later, we will use it in all other iterator types, which will be implemented in the EE repository. Needed for https://github.com/tarantool/tarantool-ee/issues/197 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
Vladimir Davydov authored
To implement all iterator types for memtx tree and hash index read views, we need to have the key definition. We can't just use the key definition stored in the index directly, because, despite the fact that a read view keeps a reference the index, its index definition may still be changed by alter (when compatible changes happen). To solve this problem, let's store a copy of the index definition in memtx tree and hash index read views. The index definition also contains the index name, which will be useful for exporting the read view to Lua. Needed for https://github.com/tarantool/tarantool-ee/issues/197 NO_DOC=internal NO_TEST=ee NO_CHANGELOG=internal
-
Vladimir Davydov authored
When an iterator gets exhausted, we often set the iterator callback to a stub function that always returns NULL. Let's add a global stub function for that so that we can reuse it. NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
- Aug 24, 2022
-
-
Sergey Bronnikov authored
See d3f32d18 for explanation. NO_CHANGELOG=ci NO_DOC=ci NO_TEST=ci
-
Sergey Bronnikov authored
Publishing workflow will run building module API documentation for opened or reopened pull request with label "full-ci" and will publish documentation on Github Pages on push to the master branch. NO_CHANGELOG=ci NO_DOC=ci NO_TEST=ci
-
Sergey Bronnikov authored
Fixup of f06417 ("doc: publish autogenerated module api documentation"). https://tarantool.github.io/tarantool/api/html/module_8h.html NO_CHANGELOG=ci NO_DOC=ci NO_TEST=ci
-
Nick Volynkin authored
Report workflow failures in PRs made by TarantoolBot to the same chat as with stable branches. Such PRs are used for automated integration testing, so it's important for the team to notice failures in them. There is no personal chat for TarantoolBot and no need to make one. NO_DOC=CI reporting NO_TEST=CI reporting NO_CHANGELOG=CI reporting
-
- Aug 23, 2022
-
-
Anna Balaeva authored
This patch allows to call `report-job-status` action with only one input: `bot-token`. VK Teams chat ID has the default value in current action, API URL has the default value in [1]. [1] `tarantool/actions/report-job-status` NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci
-
Vladimir Davydov authored
This is a degradation introduced by commit 26f7056f ("Introduce internal database read view API"): tuple garbage collection is never resumed after a snapshot. This happens, because we don't add engine read views to the read view engine list on read view construction. As a result, read_view_close() never closes the memtx engine read view. NO_DOC=bug fix NO_CHANGELOG=unreleased
-
Gleb Kashkin authored
When multiline commands were loaded from .tarantool_history, they were treated as a bunch of oneline commands. Now readline is configured to write timestamps in .tarantool_history as delimiters and multiline commands are handled correctly. If there is already a .tarantool_history file, readline will set timestamps automatically, nothing will be lost. Closes #7320 NO_DOC=bugfix NO_TEST=impossible to check readline history from lua
-