- May 15, 2023
-
-
Vladislav Shpilevoy authored
It was used for getting _schema tuple[1] field. Worked because BOX_CLUSTER_FIELD_UUID is also 1. This commit introduces BOX_SCHEMA_FIELD_VALUE. It is going to be used in the next commits more extensively for new _schema tuples. Part of #5029 NO_DOC=refactoring NO_CHANGELOG=refactoring NO_TEST=already covered
-
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
-
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
-
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.
-
- May 12, 2023
-
-
Georgiy Lebedev authored
Closes #8636 NO_TEST=<dropped functionality> @TarantoolBot document Title: Remove mentions about `IPROTO_CALL16` from `net.box` Support for `IPROTO_CALL16` was dropped: remove mentions about `call_16` option for `net.box` connections.
-
- 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
-
Maksim Kokryashkin authored
The setup-python action defaults to searching for a dependency file (requirements.txt or pyproject.toml for pip, Pipfile.lock for pipenv or poetry.lock for poetry) in the repository, and uses its hash as a part of the cache key. We don't have one, so the caching option is disabled. NO_DOC=Workflow fix NO_TEST=Workflow fix NO_CHANGELOG=Workflow fix
-
- May 05, 2023
-
-
Ilya Verbin authored
There was a typo in the commit 55295f5f ("box: populate index_object.parts with key_def module methods"): the function luaT_push_key_def() was erroneously used instead of luaT_push_key_def_nodup(). Follow-up #7356 NO_DOC=bug fix NO_TEST=memory leak NO_CHANGELOG=unreleased
-
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
-
- May 04, 2023
-
-
Mergen Imeev authored
This patch removes the 'size' argument from macros, as it was only used to set an error on failure, which is not possible for x* versions. In addition, both macros now cast the value to the specified type, as is done in the original macros. Closes #8522 NO_DOC=internal NO_TEST=internal NO_CHANGELOG=internal
-
- May 03, 2023
-
-
Maksim Kokryashkin authored
This patch adds a Python script, that uses GitHub's GraphQL API to provide automatic last update date for PR items on any specified GitHub ProjectsV2 board. Since there is no versatile enough way to automate a GitHub ProjectV2 by its own means, that is done via standard mechanism of on schedule workflow, which runs the script every hour. NO_DOC=workflow NO_TEST=workflow NO_CHANGELOG=workflow
-
Sergey Bronnikov authored
NO_CHANGELOG=internal NO_DOC=internal NO_TEST=internal
-
Sergey Bronnikov authored
Synced with description in the README updated in #5679. Show manual page: pod2man doc/man/tarantool.pod | mandoc -a NO_CHANGELOG=internal NO_DOC=internal NO_TEST=internal
-
Sergey Bronnikov authored
Follows up #7456 Follows up #5541 NO_CHANGELOG=doc NO_DOC=doc NO_TEST=doc
-
- 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
-
- Apr 28, 2023
-
-
Georgiy Lebedev authored
Response body decoding of DML and call/eval requests is very ad-hoc and hard to extend: introduce a new `response_body_decode` helper that decodes the response body similarly to `xrow_decode_dml` — this will allow to separate decoding from processing. Needed for #8147 NO_CHANGELOG=refactoring NO_DOC=refactoring NO_TEST=refactoring
-
- 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
-
- Apr 26, 2023
-
-
Sergey Bronnikov authored
To enable etcd client set the following CMake variables: - ENABLE_ETCD_CLIENT: ON - ETCD_CLIENT_DIR: path to a directory with etcd client Lua source files If ENABLE_ETCD_CLIENT is unset, then a stub implementation is built, which spits an error on attempt require etcd-client. Needed for https://github.com/tarantool/tarantool-ee/issues/443 MSG="stubs for enterprise version, no user-visible changes" NO_CHANGELOG=MSG NO_DOC=MSG NO_TEST=MSG
-
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
-
Vladimir Davydov authored
In case box.cfg.replication isn't update by box.cfg, we don't try to reestablish replication connections, but we still need to reload URIs (recreate IO stream contexts created from URIs) because a URI parameter may store a path to an SSL certificate file, which could change. This was done in commit 655290aa ("replication: always reload URIs on reconfiguration"). There's a bug in the commit: it works as expected for appliers that already connected in the past and received UUID but it ignores anonymous appliers, i.e. appliers that never connected, as a result the following code fails: -- Configure replication using a wrong SSL certificate. -- This leaves anonymous appliers reconnecting in the background. box.cfg{replication = {...}} -- Update the SSL certificate file and reload replication URIs. -- At this point, the anonymous applier should finally connect. box.cfg{replication = box.cfg.replication} Needed for tarantool/tarantool-ee#432 NO_TEST=ee NO_DOC=bug fix NO_CHANGELOG=unreleased
-
- 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
-
- 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
-
- Apr 21, 2023
-
-
Mergen Imeev authored
This patch reworks the parsing of statements associated with transactions. There are six of them: START TRANSACTION; COMMIT; ROLLBACK; SAVEPOINT savepoint_name; RELEASE [SAVEPOINT] savepoint_name; ROLLBACK TO savepoint_name; Prior to this patch, VDBE for these statements were generated while the statement was in the process of being parsed. After this patch, VDBE for all these statements will be generated only after the parsing has successfully completed. Part of #5485 NO_DOC=Will be added later NO_TEST=No user-visible changes are made NO_CHANGELOG=Will be added later
-
Vladimir Davydov authored
Even if the new value of box.cfg.listen is the same as the old one, we still need to recreate evio service entries' IO stream contexts from the URIs on reconfiguration, because a URI parameter may store a path to a file (for example, an SSL certificate), which could change. Note that we have to rework the way how IO stream contexts are handled on evio_service_attach. Before this patch, we copied struct iostream_ctx directly from the source service to the attached service. It was fine, because (a) we didn't destroy iostream_ctx on detach (we only cleared it) and (b) we detached IPROTO threads' services from tx_binary before stopping tx_binary. Now, to reload URIs, we first call the new function evio_service_reload_uris on tx_binary to recreate iostream_ctx, and only then reattach IPROTO threads' services, which opens a window for an IPROTO thread's service to access a destroyed iostream_ctx context while accepting a new connection. To avoid that, we now copy iostream_ctx to attached services with the new function iostream_ctx_copy. This function copies the underlying SSL_CTX with a stub function ssl_iostream_ctx_dup, which will be implemented in the EE repository using SSL_CTX_up_ref (i.e. no actual copying will happen - we'll just increment the internal SSL_CTX reference counter). Needed for tarantool/tarantool-ee#432 NO_DOC=ee NO_TEST=ee NO_CHANGELOG=ee
-
Vladimir Davydov authored
Even if the new value of box.cfg.replication is the same as the old one, we still need to recreate appliers' IO stream contexts from the URIs on reconfiguration, because a URI parameter may store a path to a file (for example, an SSL certificate), which could change. Needed for tarantool/tarantool-ee#432 NO_DOC=ee NO_TEST=ee NO_CHANGELOG=ee
-
Vladimir Davydov authored
If a configuration option value passed to `box.cfg` is the same as the old one, the option handler isn't called. However, sometimes we might need to do some extra work in the handler in this case. For example, even if listen/replication URI is the same, we still need to recreate the derived IO stream context, because a URI parameter may contain a path to a file (for example, an SSL certificate), which could change. So we remove the corresponding check from load_cfg.lua and instead move it to option handlers. Most of the existing dynamic option handlers already do nothing if the old and the new values are the same. There are only three exceptions: 1. box.cfg.memtx_memory. The problem is that the value is rounded up to a multiple of the quota unit size by the handler so even if we pass exactly the same value, it may mistakenly assume that the new value is less and fail. To avoid that, we make the handler round up the new value before checking it. 2. box.cfg.replication. Even though commit 5994892c ("replication: fix replica disconnect upon reconfiguration") made the handler avoid disconnect, it still tries to connect to the new URIs and sync, which may pose a problem to our users. For example, resetting box.cfg.replication to the same value on the leader after right after a new cluster bootstrap (before granting access to replicas) would lead to a replication sync, which would obviously fail on timeout. To avoid that, we make the handler compare the new and old URIs internally and do nothing if they are the same. 3. box.cfg.listen. Handled similarly to box.cfg.replication: to avoid futile rebinding of IPROTO ports, we store the last configured listen URIs in a C variable and do nothing on box.cfg if the configuration is the same. Needed for tarantool/tarantool-ee#432 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
Vladimir Davydov authored
- Call listen() once per socket in the TX thread instead of doing it in each IPROTO thread because calling listen() more than once has no effect. - Merge evio_service_bind and evio_service_listen into one method named evio_service_start to match evio_service_stop. - Rename IPROTO_CFG_LISTEN message to IPROTO_CFG_START to match IPROTO_CFG_STOP and drop the binary argument because it always attaches to tx_binary. - Drop the dead evio_service_is_active check from IPROTO_CFG_START because the service must be inactive at this point and we have an assertion for that in evio_service_attach. - Move ERRINJ_IPROTO_CFG_LISTEN error injection to iproto_listen and drop the error code of iproto_send_start_msg because it should never fail by design. Needed for tarantool/tarantool-ee#432 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
Vladimir Davydov authored
To handle the case when box.cfg.replication isn't changed (required for SSL certificate update), we need the uri set in box_set_replication. We could obtain it with cfg_get_uri_set, but calling this function right after box_check_replication, which already creates the uri set looks ugly. Let's make box_check_uri_set, box_check_replication, and box_check_listen return the uri_set, like box_check_uri does. While we are at it, fix a memory leak in box_check_config, where we forgot to destroy the uri returned by box_check_bootstrap_leader. The leak is insignificant and may only happen once so this doesn't deserve to be mentioned in the changelog. Needed for tarantool/tarantool-ee#432 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
Vladimir Davydov authored
Historically, we create appliers in box.cc and then pass them to replicaset_connect. Now, that we have struct uri_set, it's better to pass URIs instead of appliers and let replicaset_connect create appliers. It looks better because replicaset_connect may actually delete some of the passed appliers on success, which makes the function protocol difficult for understanding. Another reason to pass URIs instead of appliers is that we need to store the configured URIs in replication.cc so that we can detect the case when box.cfg doesn't change box.cfg.replication (required for SSL certificate update). While we are at it, - Make replica_set_applier and replica_clear_applier static. - Mark the URI argument of applier_new as const and copy it instead of moving. This isn't a hot path and with copying it's easier to make assumptions about object lifetime. - Remove the error label from replicaset_connect. Use a guard instead. Needed for tarantool/tarantool-ee#432 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
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
-
Vladimir Davydov authored
There's absolutely no reason to create a new iostream context for a ballot watcher, because it'll be exactly the same as the one used by the applier because it's created from the same URI. NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
Vladimir Davydov authored
Needed for tarantool/tarantool-ee#432 NO_DOC=internal NO_CHANGELOG=internal
-
- Apr 20, 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
-
Mergen Imeev authored
This patch fixes a possible 'use-after-free' of field pOrderBy in generateWithRecursiveQuery(). Closes tarantool/security#120 NO_DOC=bugfix
-
Mergen Imeev authored
This patch fixes SQL memory leaks found by static analyzers and SQL fuzzer. Part of tarantool/security#120 NO_DOC=fix for memleak NO_TEST=fix for memleak NO_CHANGELOG=fix for memleak
-
Mergen Imeev authored
The sql_xfree() function can take NULL as an argument, and this is not an error because db->lookaside.pStart > NULL. However, this causes warnings from static analyzers. Let's add an explicit check to avoid these warnings. Part of tarantool/security#120 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
Mergen Imeev authored
This patch removes some unnecessary checks that should have been removed in the 'sql: refactor memory allocation system' patch. Also, this patch removes the unnecessary check that the return value of space_by_id() is NULL in sql_check_create(). Return values is not NULL because sql_check_create() can be called in two cases: 1) space was just created, and space_id is its ID; 1) space_id was obtained directly from the space that existed at the time the VDBE was created. Part of tarantool/security#120 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
Mergen Imeev authored
This patch removes some dead code in SQL. This is done to silence static analyzers. In addition, this patch removes the mmapSizeActual field from the struct unixFile, since this field is identical to the mmapSize field in the same structure. Part of tarantool/security#120 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
- 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
-