- Aug 21, 2018
-
-
Serge Petrenko authored
lua_pushapplier() had an inexplicably small buffer for uri representation. Enlarged the buffer. Also lua_pushapplier() didn't take into account that uri_format() could return a value larger than buffer size. Fixed. Closes #3630
-
- Aug 14, 2018
-
-
Serge Petrenko authored
On bootstrap and after initial configuration replication_connect_quorum was ignored. The instance tried to connect to every replica listed in replication parameter, and failed if it wasn't possible. The patch alters this behaviour. An instance still tries to connect to every node listed in box.cfg.replication, but does not raise an error if it was able to connect to at least replication_connect_quorum instances. Closes #3428 @TarantoolBot document Title: replication_connect_quorum is not ignored Now on replica set bootstrap and in case of replication reconfiguration (e.g. calling box.cfg{replication=...} for the second time) tarantool doesn't fail, if it couldn't connect to to every replica, but could connect to replication_connect_quorum replicas. If after replication_connect_timeout seconds the instance is not connected to at least replication_connect_quorum other instances, we throw an error.
-
Serge Petrenko authored
Add start arguments to replication test instances to control replication_timeout and replication_connect_timeout settings between restarts. Needed for #3428
-
Serge Petrenko authored
Allows to pass arguments to servers started with create_cluster().
-
- Aug 13, 2018
-
-
Olga Arkhangelskaia authored
During syslog reconnect we lose nonblock flag. This leads to misbehavior while logging. Tarantool hangs forever. Closes #3615
-
- Aug 11, 2018
-
-
Vladimir Davydov authored
Reproduce file: - [box/access.test.lua, null] - [box/iterator.test.lua, null] - [box/bitset.test.lua, null] The issue happens, because box/bitset.lua:dump() uses iterate(), which gets cleared by box/iterator test. Fix this by using utils.iterate() instead.
-
- Aug 10, 2018
-
-
Vladimir Davydov authored
index.update() looks up the old tuple in the primary index, applies update operations to it, then writes a DELETE statement to secondary indexes to delete the old tuple and a REPLACE statement to all indexes to insert the new tuple. It also sets a column mask for both DELETE and REPLACE statements. The column mask is a bit mask which has a bit set if the corresponding field is updated by update operations. It is used by the write iterator for two purposes. First, the write iterator skips REPLACE statements that don't update key fields. Second, the write iterator turns a REPLACE that has a column mask that intersects with key fields into an INSERT (so that it can get annihilated with a DELETE when the time comes). The latter is correct, because if an update() does update secondary key fields, then it must have deleted the old tuple and hence the new tuple is unique in terms of extended key (merged primary and secondary key parts, i.e. cmp_def). The problem is that a bit may be set in a column mask even if the corresponding field does not actually get updated. For example, consider the following example. s = box.schema.space.create('test', {engine = 'vinyl'}) s:create_index('pk') s:create_index('sk', {parts = {2, 'unsigned'}}) s:insert{1, 10} box.snapshot() s:update(1, {{'=', 2, 10}}) The update() doesn't modify the secondary key field so it only writes REPLACE{1, 10} to the secondary index (actually it writes DELETE{1, 10} too, but it gets overwritten by the REPLACE). However, the REPLACE has column mask that says that update() does modify the key field, because a column mask is generated solely from update operations, before applying them. As a result, the write iterator will not skip this REPLACE on dump. This won't have any serious consequences, because this is a mere optimization. What is worse, the write iterator will also turn the REPLACE into an INSERT, which is absolutely wrong as the REPLACE is preceded by INSERT{1, 10}. If the tuple gets deleted, the DELETE statement and the INSERT created by the write iterator from the REPLACE will get annihilated, leaving the old INSERT{1, 10} visible. The issue may result in invalid select() output as demonstrated in the issue description. It may also result in crashes, because the tuple cache is very sensible to invalid select() output. To fix this issue let's clear key bits in the column mask if we detect that an update() doesn't actually update secondary key fields although the column mask says it does. Closes #3607
-
- Aug 08, 2018
-
-
Mergen Imeev authored
In some cases operation box.snapshot() takes longer than expected. This leads to situations when the previous error is reported instead of the new one. Now these errors completely separated. Closes #3599
-
- Aug 07, 2018
-
-
Kirill Yukhin authored
Print reproduce file.
-
Sergei Voronezhskii authored
The -j -1 used to legacy consistent mode. Reducing the number of jobs to one by switching to -j 1, uses same part of the code as in parallel mode. The code in parallel mode kills hung tests. Part of https://github.com/tarantool/test-run/issues/106
-
Vladimir Davydov authored
It is dangerous to call box.cfg() concurrently from different fibers. For example, replication configuration uses static variables and yields so calling it concurrently can result in a crash. To make sure it never happens, let's protect box.cfg() with a lock. Closes #3606
-
- Aug 03, 2018
-
-
Alexander Turenko authored
Fixes #3489.
-
- Aug 02, 2018
-
-
Alexander Turenko authored
* support expected fail of non-default server * fix format_process function: prevent crash on some machines (#92) * print whole reject file when a test failed (#102)
-
Eugine Blikh authored
No more `include/yaml.h` and `lib/libyaml_static.a` installs. closes gh-3547
-
- Jul 26, 2018
-
-
Konstantin Belyavskiy authored
Fix 'fio.rmtree' to remove a non empty directories. And update test. Closes #3258
-
- Jul 22, 2018
-
-
Vladimir Davydov authored
When a replica is removed from the cluster table, the corresponding replica struct isn't destroyed unless both the relay and the applier attached to it are stopped, see replica_clear_id(). Since replica struct is a holder of the garbage collection state, this means that in case an evicted replica has an applier or a relay that fails to exit for some reason, garbage collection will hang. A relay thread stops as soon as the replica it was started for receives a row that tries to delete it from the cluster table (because this isn't allowed by the cluster space trigger, see on_replace_dd_cluster()). If a replica isn't running, the corresponding relay can't run as well, because writing to a closed socket isn't allowed. That said, a relay can't block garbage collection. An applier, however, is deleted only when replication is reconfigured. So if a replica that was evicted from the cluster was configured as a master, its replica struct will hang around blocking garbage collection for as long as the replica remains in box.cfg.replication. This is what happens in #3546. Fix this issue by forcefully unregistering a replica with the garbage collector when it is deleted from the cluster table. This is OK as it won't be able to resubscribe and so we don't need to keep WALs for it any longer. Note, the relay thread may still be running when a replica is deleted from the cluster table, in which case we can't unregister it with the garbage collector right away, because the relay may need to access the garbage collection state. In such a case, leave the job to replica_clear_relay, which is called as soon as the relay thread exits. Closes #3546
-
- Jul 19, 2018
-
-
Kirill Shcherbatov authored
_say function was called with invalid arguments. Thank @sorc1 for patch. Closes #3433.
-
Olga Arkhangelskaia authored
Strdup may silently fail without any message from tarantool. Patch adds this checks.
-
- Jul 17, 2018
-
-
Kirill Shcherbatov authored
Net.box didn't pass options containing iterator to server side. There were also invalid results for two :count tests in net.box.result file. Thanks @ademenev for contributing problem and help with problem locating. Closes #3262.
-
- Jul 16, 2018
-
-
Georgy Kirichenko authored
If a fiber pool reuses already canceled fiber then the fiber reports an error for any next request. Now canceled fiber returns and fiber pool creates a new one. Fixes #3527
-
- Jul 13, 2018
-
-
Kirill Yukhin authored
New commit in third_party/libyaml downgrades required cmake version.
-
Ivan Kosenko authored
-
- Jul 12, 2018
-
-
Kirill Shcherbatov authored
Need to update tests as with fixup in upstrem commit baf636a74b4b6d055d93e2d01366d6097eb82d90 Author: Tina Müller <cpan2@tinita.de> Date: Thu Jun 14 19:27:04 2018 +0200 The closing single quote needs to be indented... if it's on its own line. Closes #3275.
-
Kirill Yukhin authored
Closes #3275.
-
Vladislav Shpilevoy authored
Found by @ImeevMA
-
- Jul 10, 2018
-
-
Konstantin Belyavskiy authored
Next checkpoint time is set by the formula: period = self.checkpoint_interval + offset, where offset is defined as follow: offset = random % self.checkpoint_interval So offset must be calculated again if at least the new interval is less than the old one. Closes #3370
-
Kirill Shcherbatov authored
Now it is possible to specify a number in exponential form via all formats allowed by json standard. json.decode('{"remained_amount":2.0e+3}') json.decode('{"remained_amount":2.0E+3}') json.decode('{"remained_amount":2e+3}') json.decode('{"remained_amount":2E+3}') <-- fixed Closes #3514.
-
- Jul 09, 2018
-
-
Serge Petrenko authored
Schema version is used by both clients and internal modules to check whether there vere any updates in spaces and indices. While clients only need to be notified when there is a noticeable change, e.g. space is removed, internal components also need to be notified when something like space:truncate() happens, because even though this operation doesn't change space id or any of its indices, it creates a new space object, so all the pointers to the old object have to be updated. Currently both clients and internals share the same schema version, which leads to unnecessary updates on the client side. Fix this by implementing 2 separate counters for internal and public use: schema_state gets updated on every change, including recreation of the same space object, while schema_version is updated only when there are noticable changes for the clients. Introduce a new AlterOp to alter.cc to update public schema_version. Now all the internals reference schema_state, while all the clients use schema_version. box.iternal.schema_version() returns schema_version (the public one). Closes: #3414
-
- Jul 05, 2018
-
-
Kirill Shcherbatov authored
Fixed FreeBSD build: there were conflicting types bitset declared in lib/bitset and _cpuset.h that is the part of pthread_np.h used on FreeBSD. Resolves #3046.
-
Kirill Yukhin authored
After read-only flag is dropped, a test space is created successfully and on next launch creation will fail since it is not droppped. Drop the space. Closes #3507
-
- Jul 04, 2018
-
-
Serge Petrenko authored
box.session.su() set effective user to user after its execution, which made nested calls to it not work. Fixed this by saving current effective user and recovering from the save after sudo execution. This opened up a bug in box.schema.user.drop(): it has unnecessary check for privelege PRIV_REVOKE, which never gets granted to anyone but admin. Also fixed this by adding one extra box.session.su() call. Closes #3090, #3492
-
- Jul 03, 2018
-
-
Konstantin Osipov authored
Before this patch, memtx would silently roll back a multi-statement transaction on yield, switching the session to autocommit mode. It would do nothing in case yield happened in a sub-statement in auto-commit mode. This could lead to nasty/painful to debug side-effects in malformed Lua programs. Fix by adding a special transaction state - aborted, and enter this state in case of implicit yield. Check for what happens when a sub-statement yields. Check that yield trigger is removed by a rollback. Fixes gh-2631 Fixes gh-2528
-
- Jun 29, 2018
-
-
Konstantin Osipov authored
fiber->on_yield triggers were not invoked in fiber_call(), which meant that memtx transaction was not rolled back by fiber.create(). Fixes gh-3493
-
- Jun 28, 2018
-
-
Ilya Markov authored
Bug: During parsing http headers, long headers names are truncated to zero length, but values are not ignored. Fix this with adding parameter max_header_name_length to http request. If header name is bigger than this value, header name is truncated to this length. Default value of max_header_name_length is 32. Do some refactoring with renaming long names in http_parser. Closes #3451
-
Ilya Markov authored
Bug: Header parser validates http status line and besides saving http status, saves valid characters to header name, which is wrong. Fix this with skipping status line after validation without saving it as a header. In scope of #3451
-
Vladimir Davydov authored
If tarantool is stopped while writing a snapshot or a vinyl run file, inprogress files will never be removed. Fix this by collecting those files on recovery completion. Original patch by @IlyaMarkovMipt. Reworked by @locker. Closes #3406
-
Ilya Markov authored
In order to log only about files that were actually removed change log messages from "removing <name of file>" to "removed <name of file>" in vy_run_remove_files and xdir_collect_garbage functions. Needed for #3406
-
Konstantin Osipov authored
A minor follow up on the fix for gh-3452 (http.client timeout bug)
-
Ilya Markov authored
Current implementation of http.client relies on fiber_cond which is set after the request was registered and doesn't consider the fact that response may be handled before the set of fiber_cond. So we may have the following situation: 1. Register request in libcurl(curl_multi_add_handle in curl_execute). 2. Receive and process response, fiber_cond_signal on cond_var which no one waits. 3. fiber_cond_wait on cond which is already signaled. Wait until timeout is fired. In this case user have to wait timeout, though data was received earlier. Fix this with adding extra flag in_progress to curl_request struct. Set this flag true before registering request in libcurl and set it false when request is finished before fiber_cond_signal. When in_progress flag is false, don't wait on cond variable. Add 1 error injection. Closes #3452
-