- Sep 04, 2017
-
-
Roman Tsisyk authored
Since #1265 tarantool is fully compatible with lua5.1. Install /usr/bin/tarantool as /usr/bin/lua alternative. Closes #2730
-
Vladimir Davydov authored
The check was accidentally broken by commit eb5cd536 ("vinyl: do not track partial reads in tx manager"). Add a test case to avoid similar screw-ups in future. See #2716
-
Vladimir Davydov authored
There are two cases in the hermitage test that check gap locks - PMP (predicate with many preceders) and G4 (anti-dependency cycles). As we didn't have gap locks, we used get() to put a non-existent value to the conflict set. Now we can use select(*) instead.
-
Vladimir Davydov authored
-
Vladimir Davydov authored
Currently, the conflict manager only tracks keys returned by the read iterator, so Vinyl isn't really serializable as select() can return phantom records, e.g. space: {10}, {20}, {30}, {40}, {50} Transaction 1 Transaction 2 ------------- ------------- box.begin() space:select({30}, {iterator='GE'}) -- returns {30}, {40}, {50} box.begin() box.insert{35} box.insert{45} box.insert{55} box.commit() space:select({30}, {iterator='GE'}) -- returns {30}, {35}, {40}, {45}, {50}, {55}; -- were it serializable, the transaction would -- be sent to read view so that this select() -- would return the same set of values as the -- previous one box.commit() Besides, tracking individual keys read by a transaction can be very expensive from the memory consumption point of view: think of calling select(*) on a big space. So this patch makes the conflict manager track intervals instead of individual keys. To achieve that it splits tx_manager->read_set in two: - vy_tx->read_set. Contains intervals read by a transaction. Needed to efficiently search intervals that should be merged with a new one. Intervals in this tree cannot intersect. - vy_index->read_set. Contains intervals read by all transaction from an index. Needed to efficiently search transactions that conflict with a write. Intervals can intersect. When vy_tx_track() is called, it first looks up all intervals intersecting with the new interval in vy_tx->read_set, removes them, and extends the new interval to span them. Then it inserts the new interval into both vy_index->read_set and vy_tx->read_set. The vy_index->read_set is used on commit to send all transactions that read intervals modified by the committed statement to read view. Note, now we don't differentiate 'gaps', i.e. non-existent keys read by a transaction. Gaps were used to avoid aborting a transaction if a non-existent key read by it is deleted. We can't track gaps without bloating the read set on select(*). Closes #2671
-
Vladimir Davydov authored
Currently, this is done in each plain iterator (run, mem, txw, cache). To handle the empty search key the same way as non-empty keys when setting a gap lock, this needs to be handled in vy_read_iterator. Needed for #2671
-
Vladimir Davydov authored
To set a gap lock properly, the read iterator needs to discern ITER_REQ from ITER_LE, which is used by vy_cursor instead of ITER_REQ. Needed for #2671
-
Vladimir Davydov authored
-
- Sep 01, 2017
-
-
Vladislav Shpilevoy authored
The trigger is called when the flush callback sends messages to the consumer pipe (in cpipe_flush_cb, if messages queue is not empty). Needed for #946 to send buffers from tx to iproto.
-
Vladimir Davydov authored
To rebuild an index when its key def changes, we effectively drop it and create a new index instead. Skipping Index::commitDrop and commitCreate stages at this point deprives Vinyl of an opportunity to log the change in the metadata log and replace the index in the scheduler, which leads to a crash. This patch adds the commit stage to RebuildIndex which calls the above-mentioned commitDrop and commitCreate for the old and the new indexes, respectively. There is a nuance here. Memtx piggybacks Index::commitDrop to drop space tuples when the primary index is dropped. This is actually wrong for tuples belong to a space, not to an index. Besides, it prevents us from just calling Index::commitDrop() from RebuildIndex::commit() as is, because RebuildIndex does not modify space data, it just moves space tuples to a new index. To circumvent this, let us remove commitDrop() method from MemtxIndex and drop space tuples directly from MemtxSpace's commitTruncateSpace() and commitAlterSpace().
-
- Aug 30, 2017
-
-
Vladimir Davydov authored
space:select(key, {limit = N}) limits the output to N keys, but it still fetches the (N+1)-th key from the engine. This is pointless. Besides, this can result in a conflict in Vinyl as Vinyl adds all keys returned by iterator to the conflict manager.
-
Vladislav Shpilevoy authored
-
- Aug 28, 2017
-
-
Roman Tsisyk authored
Patch aa549401 "Split key_def.h/.cc" accidentally added FIELD_TYPE_MAP member to `enum field_type`. Currently this enum is only used to define index parts. We don't support 'map' indexed field type at least in 1.7.x. See #2652
-
Vladislav Shpilevoy authored
Part of #2652
-
- Aug 24, 2017
-
-
Vladislav Shpilevoy authored
In the next patches the field_def will being parsed from space:format. Field_def will contain char *name, which is limited by BOX_NAME_MAX = 65000. So neither opt_type OPT_STR or OPT_STRPTR can be used to parse this name from space:format. Besides, field_def contains enum field_type, which can not be parsed using and opt_type. Also, field_def will contain default_value, which can store values of many types. Proposal is to use opt_create_from_field not for entire field_def, but only for several fields using opts_parse_key. And parse other options manualy.
-
Vladislav Shpilevoy authored
Needed for #2652
-
Konstantin Osipov authored
replication/cluster.test.py would fail at server exit, because at_exit() handler tries to destroy a cbus while its mutex is locked. args.test.py would fail when run with 'make test'
-
- Aug 22, 2017
-
-
Vladimir Davydov authored
fiber_time() reports real time, which shouldn't be used for calculating timeouts as it is affected by system time changes. Add fiber_clock() based on ev_monotonic_now(), export it to Lua, and use it instead. Needed for #2527
-
Vladimir Davydov authored
We should use ev_monotonic_now()/ev_monotonic_time() instead of ev_now()/ev_time() for calculating timeouts, because the latter are affected by system time changes so that using them for timeouts can lead to unexpected hangs in case system time changes. Needed for #2527
-
Vladimir Davydov authored
ev_now()/ev_time() are affected by system time changes, which makes them impractical for calculating timeouts. Introduce ev_monotonic_now() and ev_monotonic_time() which work exactly as ev_now()/ev_time(), but use monotonic clock instead of realtime. Needed for #2527
-
Roman Tsisyk authored
Follow up #1265
-
Alexandr Lyapunov authored
Follow up #2662
-
Roman Tsisyk authored
Finally fix compatibility with Lua 5.1 command-line options. Closes #1265
-
Roman Tsisyk authored
`tarantool -` now executes stdin instead of trying open "./-" script. A part of #1265
-
Roman Tsisyk authored
-e EXPR - execute string 'EXPR -l NAME - require library 'NAME' A part of #1265
-
Roman Tsisyk authored
`tarantool -i SCRIPT` forces Tarantool to enter into interactive mode after executing SCRIPT or stdin. A part of #1265
-
Roman Tsisyk authored
getopt_long() is available on all supported platforms. Get rid of legacy gopt and use getopt_long(). Incompatible changes: * `tarantool --version --no-such-option` printed "unrecognized option '--no-such-option'", now it displays version. `tarantool --no-such-option --version` still prints an error message. Needed for #1265
-
Georgy Kirichenko authored
- Reference vy_index for every tx value. - Abort transaction on commit if format was changed by DDL. Fixes #2342
-
Georgy Kirichenko authored
Check that Tarantool doesn't crash when space remove while cursor is open. Fixes #2342
-
Georgy Kirichenko authored
Disconnect replications slave if no ACKs have been received for a time of `replication_timeout`. This parameter is accessible via box.cfg{} and applies to all new slave connections. Follow up #2484
-
Georgy Kirichenko authored
Handle mixed replica_id transaction for wal=none mode. Follow replicaset vclock after wal writes. Follow @05eef5fa
-
Georgy Kirichenko authored
On schema version update netbox starts schema reloading but not disconnects from remote server, so report state as connected for this case Fixed #2665
-
Vladimir Davydov authored
-
Georgy Kirichenko authored
On cpipe_destroy all queued messages were flushed to endpoint but queue length counter was not zeroed. This breaks an empty pipe check at cpipe_flush_cb and then crashes tarantool in cases if corresponding endpoint has been already deleteted before this callback invocation. Fixed #2703
-
Roman Tsisyk authored
Replace dynamic function pointers with link-time resolving. Needed for #2335
-
Georgy Kirichenko authored
Don't resend relay vclock if not changed because a relay loop might be woken up with cbus messaging.
-
- Aug 21, 2017
-
-
Vladislav Shpilevoy authored
Now system space formats contain conflicts between space:format, their index parts and actual tuple fields. Such formats can not be used to check tuple fields in SQL. Fix them in order of #2652
-
Vladislav Shpilevoy authored
strlen() can not be called on message pack auth data. Besides, auth data can be not only string, but also array or map. And if array/map is empty, strlen() returns > 0 - it is incorrect. Needed for #2652
-
Roman Tsisyk authored
- Use malloc() as a fallback for lsregion for large size - Set Vinyl slab_size to 16Mb and don't use vinyl_max_tuple_size for calculation - Allow dynamic configuration of vinyl_max_tuple_size A part of #2342
-