- Oct 28, 2021
-
-
Serge Petrenko authored
Replication reconfiguration used to work as follows: upon receiving a new config disconnect from all the existing masters and try to connect to all the masters from the new config. This lead to instances doing extra work when old config and new config had the same nodes in them: instead of doing nothing, tarantool reinitialized the connection. There was another problem: when an existing connection is broken, master takes some time to notice that. So, when replica resets the connection, it may try to reconnect faster than the master is able to notice its absence. In this case replica wouldn't be able to reconnect due to `duplicate connection with the same replica UUID`. So replication would stop for a replication_timeout, which may be quite large (seconds or tens of seconds). Let's prevent tarantool from reconnecting to the same instance, if there already is a working connection. Closes #4669
-
Serge Petrenko authored
Once an anonymous replica tries to register, it reconnects to every other instance in its replication list in order to receive updated ballots and choose someone to register on. Make the instance wait until it connects to quorum before letting it choose the node to register on.
-
Mergen Imeev authored
Since the function arguments are always sequential in the array of all VDBE MEMs, we don't need to store the position of each argument. The position of the first MEM and the number of arguments are sufficient to describe all the arguments. Part of #4145
-
Mergen Imeev authored
This patch removed MEM_TYPE_AGG, which is no longer used due to recent changes. Part of #4145
-
Mergen Imeev authored
This patch removes copying of the result in the finalizers of the SQL built-in aggregate functions. Part of #4145
-
Mergen Imeev authored
Part of #4145
-
Mergen Imeev authored
Part of #4145
-
Mergen Imeev authored
Part of #4145
-
Mergen Imeev authored
Part of #4145
-
Mergen Imeev authored
Part of #4145
-
Mergen Imeev authored
Part of #4145
-
Mergen Imeev authored
We don't need this function, since it is easier to call finalizers directly. This patch also allows us to make further simplifications. Needed for #4145
-
Mergen Imeev authored
This patch introduces the mem_append() function. This function appends the specified string to the end of the STRING or VARBINARY contained in MEM. In case MEM needs to increase the size of allocated memory, extra memory is allocated in an attempt to reduce the total number of allocations. Needed for #4145
-
Mergen Imeev authored
This patch makes it easier to get a collation by a function. Needed for #4145
-
Mergen Imeev authored
This patch moves the initialization of sql_context out of the VDBE. This allows us to remove the opcodes OP_BuiltinFunction0 and OP_AggStep0, which work in a rather strange way. Moreover, due to the changes these opcodes make to the VDBEs, it is possible that the estimated size of the VDBE may change during execution of VDBE, which could lead to various problems. Needed for #4145
-
Mergen Imeev authored
This patch makes OP_FunctionByName, OP_AggStep and OP_BuiltinFunction to use register P1 for the number of arguments instead of register P5. This makes it easier to use these opcodes. Needed for #4145
-
Mergen Imeev authored
This patch fixes possible undefined behavior during the implicit cast of INTEGER to DOUBLE. The problem is, if the INTEGER is close enough to 2^64, it will be cast to 2^64 when it is cast to DOUBLE. Since we have a check for loss of precision, this will cause this DOUBLE to be cast to an INTEGER, which will result in undefined behavior since this DOUBLE is outside the range of INTEGER.
-
Mergen Imeev authored
This patch removes zeroblob optimization from SQL code. This optimization complicates the code, and there is almost no profit from it. Closes #6113 Needed for #4145
-
Yaroslav Lobankov authored
This patch extends the 'integration.yml' workflow and adds a new workflow call for running tests to verify integration between tarantool and the avro-schema module. Part of #5265 Part of #6056 Closes #6558
-
- Oct 27, 2021
-
-
Yaroslav Lobankov authored
This patch extends the 'integration.yml' workflow and adds a new workflow call for running tests to verify integration between tarantool and the metrics module. Part of tarantool/tarantool#5265 Part of tarantool/tarantool#6056 Closes tarantool/tarantool#6526
-
Vladimir Davydov authored
*.inprogress files shouldn't be deleted during normal GC, because they may be in use. E.g. GC may happen to run while WAL is rotating xlog; if GC removes the transient xlog.inprogress file created by WAL (see xdir_create_xlog), WAL will fail to rename it and abort the current transaction. Initially, inprogress files were removed only after recovery. For this reason, xdir_collect_inprogress, which is used for deleting inprogress files, accesses FS directly, without COIO. This was changed by commit 5aa243de ("recovery: build secondary index in hot standby mode") which moved xdir_collect_inprogress from memtx_engine_end_recovery to memtx_engine_collect_garbage so that a hot standby instance doesn't delete inprogress files of the master instance by mistake. To fix this issue, let's move xdir_collect_inprogress back where it belongs, to engine_end_recovery, and introduce a new callback for memtx to build its secondary keys before entering the hot standby mode - engine_begin_hot_standby. Let's also remove engine_collect_garbage from gc_init, which was added there by the aforementioned commit, probably to make tests pass. The bug was reported by the vinyl/deferred_delete test (#5089). Closes #6554
-
- Oct 26, 2021
-
-
VitaliyaIoffe authored
Quorum.test.lua was migrated to luatest. It was divided into several tests. Delete quorum.test.lua, fix suite.ini in replication tests. Part of tarantool/test-run#304
-
VitaliyaIoffe authored
Use luatest for checking correctness behavioral for encode/decode functions Delete msgpack.test.lua. Part of tarantool/test-run#304
-
VitaliyaIoffe authored
The commit includes a few helpers files for luatest infrastructure. 'Server' based on luatest Server with additional functionality like waiting Server for start, create Server's own env including box.cfg provided by test. Servers could be built and added in a cluster (cluster.lua file). Asserts.lua is additional checks, which are useful for many tests. Helpers are supportive function, could be also used for many tests. Part of tarantool/test-run#304
-
- Oct 25, 2021
-
-
mechanik20051988 authored
Same as for local transactions, timeout for iproto transactions was implemented. If timeout is not specified in client request it's sets to box.cfg.txn_timeout, which specified on server side. Closes #6177 @TarantoolBot document Title: ability to set timeout for iproto transactions was implemented A new `IPROTO_TIMEOUT 0x56` key has been added. Currently it is used to set a timeout for transactions over iproto streams. It is stored in the body of 'IPROTO_BEGIN' request. If user want's to specify timeout using netbox (3s for example), he should use 'stream:begin({timeout = 3}).
-
mechanik20051988 authored
Client code errors or manual mistakes can create transactions that are never closed. Such transaction will work as a memory leak. Implement timeout for transactions after which they are rolled back. Part of #6177 @TarantoolBot document Title: ability to set timeout for transactions was implemented Previously transactions are never closed until commit or rollback. Timeout for transactions was implemented after which they are rolled back. For these purpose, in `box.begin` the optional table parameter was added. For example if user want to start transaction with timeout 3s, he should use `box.begin({timeout = 3})`. Also was implement new configuration option `box.cfg.txn_timeout` which determines timeout for transactions, for which the timeout was not explicitly set. By default this option is set to infinity (TIMEOUT_INFINITY = 365 * 100 * 86400). Also in C API was added new function to set timeout for transaction - 'box_txn_set_timeout'.
-
mechanik20051988 authored
Previously, if a yield occurs for a transaction that does not support it, we roll back all its statements, but still process its new statements (they will roll back with each yield). Also, the transaction will be rolled back when a commit is attempted. Now we stop processing any new statements right after first yield, if transaction doesn't support it. This is done so that when we implement timeout for transactions, the rollback of the transaction at its expiration and at yield has the same behavior. Part of #6177
-
mechanik20051988 authored
We are going to implement timeout for transaction, after which it will be rolled back. The timeout starts counting from the moment of the first yield. Previously `txn_on_yield` trigger installed only in case when engine does not support yields for transactions. Now it is installed when transaction is created, but if transaction supports yields it doesn't do anything. In the following patches, we will use this trigger to start the transaction timeout countdown. Part of #6177
-
- Oct 22, 2021
-
-
VitaliyaIoffe authored
There are different warnings after adding checks and luatest submodules. Follows-up tarantool/test-run#304
-
Yaroslav Lobankov authored
This patch extends the 'integration.yml' workflow and adds a new workflow call for running tests to verify integration between tarantool and the smtp module. Part of #5265 Part of #6056 Closes #6523
-
AnastasMIPT authored
New function box.txn_id(), which returns the id of the current transaction if called within a transaction, nil otherwise. Closes #6396 @TarantoolBot document Title: new function box.txn_id() New function in module box: box.txn_id(), which returns the id of the current transaction if called within a transaction, nil otherwise.
-
Alexander Turenko authored
A simple example is in the test-run source tree (`test/test-luatest/smoke_check_test.lua`). https://github.com/tarantool/test-run/issues/304 https://github.com/tarantool/test-run/pull/310
-
- Oct 21, 2021
-
-
Yaroslav Lobankov authored
The idea of these changes is to run testing workflows on self-hosted ubuntu-20.04 machines instead of GitHub ubuntu-20.04 runners. It is planned to use GitHub ubuntu-20.04 runners only for integration testing of tarantool with a module/connector where ephemeral environments will allow us avoiding various cleanup pains on self-hosted runners like - if: always() run: sudo apt-get -y purge 'tarantool*' or - if: always() run: rm -rf .rocks or - if: always() run: rm -rf pytest-venv Also, switch workflows running on GitHub ubuntu-18.04 runners to self-hosted ubuntu-20.04 machines.
-
Georgy Moiseev authored
Bump debian/compat to 10 since 9 is deprecated. Bump minimal required debhelper to 10 (except for Ubuntu Trusty and Xenial) since it is the recommended practice for compatibility level setup. Closes #6393
-
mechanik20051988 authored
The maximal unix socket file length is 108 symbols on Linux, so we should decrease file name to fit in this size.
-
Vladimir Davydov authored
The session can be closed while kharon is travelling between tx and iproto. If this happens, kharon shouldn't go back to iproto when it returns to tx, even if there are pending pushes, because the connection is going to be freed soon. Thanks to @Gerold103 for the simple fix. Closes #6520
-
- Oct 20, 2021
-
-
Mergen Imeev authored
This patch removes the DECIMAL truncation in LIMIT and OFFSET, because according to the implicit casting rules, DECIMAL with digits after the decimal point cannot be implicitly cast to INTEGER. Closes #6485
-
Mergen Imeev authored
This patch fixes an assertion when casting DECIMAL value less than 0 and greater than -1 to INTEGER. Part of #6485
-
Mergen Imeev authored
In case the DECIMAL value is implicitly cast to INTEGER during a search using an index, it was possible that DECIMAL would be truncated, which is not correct according to the implicit cast rules. This patch removes this truncation. Part of #6485
-
mechanik20051988 authored
In case user enters invalid listen address, tarantool closes previous listen socket, but bind on invalid address fails also, so tarantool becames blind - no listening socket at all. This patch fixed this behaviour, now tarantool still listen old listen address. Closes #6092
-