- Nov 15, 2019
-
-
Alexander Turenko authored
The problem appears after 6c627af3 ('test: tarantoolctl: verify delayed box.cfg()'), where the test case was changed and it doesn't more assume an error at the instance start. So we need to stop it to prevent a situation when instances are stay after `make test`. Fixes #4600. Reviewed-by:
Vladislav Shpilevoy <v.shpilevoy@tarantool.org> (cherry picked from commit 8d363c43)
-
- Aug 23, 2019
-
-
Alexander Turenko authored
app-tap.tarantoolctl.test.lua fails after 17df9edf ('tarantoolctl: allow to start instances with delayed box.cfg{}'). The commit fixes the test case that did check that an error is reported if box.cfg() was not called in an instance script. Follows up #4435. Fixes #4448. (cherry picked from commit 6c627af3)
-
- Jul 26, 2019
-
-
Kirill Shcherbatov authored
Closes #1260 @TarantoolBot document Title: introduce func indexes in memtx Now you can define a func_index using a registered persistent function. There are restrictions for function and key definition for a functional index: - the referenced function must be persistent, deterministic and must return a scalar type or an array. - you must define key parts which describe the function return value - the function must return data which types match the defined key parts - the function may return multiple keys; this would be a multikey functional index; each key entry is indexed separately; - for multikey functional indexes, the key definition should start with part 1 and cover all returned key parts - key parts can't use JSON paths. - the function used for the functional index can not access tuple fields by name, only by index. Functional index can't be primary. It is not possible to change the used function after a functional index is defined on it. The index must be dropped first. Each key returned by functional index function (even when it is a single scalar) must be returned as a table i.e. {1} and must match the key definition. To define a multikey functional index, create a function with opts = {is_multikey = true} and return a table of keys. Example: s = box.schema.space.create('withdata') s:format({{name = 'name', type = 'string'}, {name = 'address', type = 'string'}}) pk = s:create_index('name', {parts = {1, 'string'}}) lua_code = [[function(tuple) local address = string.split(tuple[2]) local ret = {} for _, v in pairs(address) do table.insert(ret, {utf8.upper(v)}) end return ret end]] box.schema.func.create('address', {body = lua_code, is_deterministic = true, is_sandboxed = true, opts = {is_multikey = true}}) idx = s:create_index('addr', {unique = false, func = 'address', parts = {{1, 'string', collation = 'unicode_ci'}}}) s:insert({"James", "SIS Building Lambeth London UK"}) s:insert({"Sherlock", "221B Baker St Marylebone London NW1 6XE UK"}) idx:select('Uk') --- - - ['James', 'SIS Building Lambeth London UK'] - ['Sherlock', '221B Baker St Marylebone London NW1 6XE UK'] ...
-
- Jun 06, 2019
-
-
Roman Khabibov authored
Add "_vcollation" sysview to read it from net.box. This sysview is always readable, except when a user doesn't have "public" role. Needed for #3941 @TarantoolBot document Title: box.space._vcollation _vcollation is a system space that represents a virtual view. The structure of its tuples is identical to that of _collation. Tuples of this sysview is always readable, except when the user doesn't have "public" role.
-
Kirill Shcherbatov authored
This patch introduces a new system space to persist check constraints. The format of the new system space is _ck_constraint (space id = 364) [<space id> UINT, <constraint name> STR, <is_deferred>BOOL, <language>STR, <code>STR] A CK constraint is local for a space, so every pair <space id, CK name> is unique (it is also the PK in the _ck_constraint space). After insertion into this space, a new instance describing check constraint is created. Check constraint holds an exspression AST. While space features some check constraints, it isn't allowed to be dropped. The :drop() space method firstly deletes all check constraints and then removes an entry from the _space. Because the space alter, the index alter and the space truncate operations cause space recreation process, a new RebuildCkConstrains object is introduced. This alter object compiles a new ck constraint object, replaces and removes an existent instances atomically (but if the assembly of some ck constraint object fails, nothing is changed). In fact, in scope of this patch we don't really need to recreate a ck_constraint object in such situations (it is enough to patch space_def pointer in AST tree like we did it before, but we are going to recompile a VDBE that represents ck constraint in further patches, and that operation is not safe). The main motivation for these changes is an ability to support ADD CHECK CONSTRAINT operation in the future. CK constraints are easier to manage as self-sustained objects: such change is managed with atomic insertion(unlike the current architecture). Finally, the xfer optimization is disabled now if some space have ck constraints. In following patches this xfer optimisation becomes impossible, so there is no reason to rewrite this code now. Needed for #3691
-
- Apr 16, 2019
-
-
Roman Khabibov authored
Added a check whether box.cfg() is called within an instance file. If box.cfg() is missed, point a user the reason of a fail explicitly. Before this commit the error was look so: /usr/bin/tarantoolctl:541: attempt to index a nil value Closes #3953
-
- Apr 05, 2019
-
-
Mergen Imeev authored
These tables won't be used anymore and should be deleted. Note, this patch breaks backward compatibility between 2.1.1 and 2.1.2, but that's okay as 2.1.1 was beta and we didn't recommend anyone to use it. Part of #2843 Follow up #4069
-
- Mar 26, 2019
-
-
Alexander Turenko authored
Stop a file processing loop only when it is guaranteed that we will not find a record that match user-provided filters later in this file. If --replica R is provided one time and we're meet a record from R with a LSN equal or above of a --to value, we'll stop the loop. Otherwise (no --replica, several --replica arguments) a file will be read until an end even if --to is provided. Fixes #3827.
-
Alexander Turenko authored
Exposed this unified code (filter_xlog() function) and wrote a unit test. Allow to run app-tap/tarantoolctl.test.lua w/o test-run. Needed for #3827.
-
- Sep 25, 2018
-
-
Serge Petrenko authored
If space.before_replace returns the old tuple, the operation turns into no-op, but is still written to WAL as IPROTO_NOP for the sake of replication. Such a request doesn't have a body, and tarantoolctl failed to parse such requests in `tarantoolctl cat` and `tarantoolctl play`. Fix this by checking whether a request has a body. Also skip such requests in `play`, since they have no effect, and, while we're at it, make sure `play` and `cat` do not read excess rows with lsn>=to in case these rows are skipped. Closes #3675
-
- Aug 22, 2018
-
-
Vladimir Davydov authored
The space is a blackhole. It will be used for writing deferred DELETE statements generated by vinyl compaction tasks to WAL so that we can recover deferred DELETEs that hadn't been dumped to disk before the server was restarted. Since the new space doesn't depend on other system spaces, let's assign the minimal possible id to it, i.e. 257. Needed for #2129
-
- Aug 21, 2018
-
-
Serge Petrenko authored
Tarantoolctl enter didn't check whether connection to a socket was established if a socket file existed. It just executed a local console. Fix this by adding a check and an error, also add a test case. Closes #3364
-
- Aug 20, 2018
-
-
Vladimir Davydov authored
If `tarantoolctl eval` fails, apart from returning 3 and printing the eval error to stderr, tarantoolctl will also emit the following message: Error while reloading config: This message is quite confusing and useless too, as we have the return code for that. Let's zap it. Closes #3560
-
- Aug 17, 2018
-
-
Serge Petrenko authored
When `tarantoolctl status` is called immediately after `tarantoolctl stop` there is a chance that tarantool hasn't exited yet, so the pid file still exists, which is reported by `tarantoolctl status`. This leads to occasional test failures. Fix this by waiting till tarantool exits before calling `status`. Closes #3557
-
- Aug 13, 2018
-
-
Vladimir Davydov authored
There's a new system space _fk_constraint with two indexes. Take this into account in tests that check presence of system spaces.
-
- Jun 29, 2018
-
-
Kirill Shcherbatov authored
As we would like to lookup triggers by space_id in future on space deletion to delete associated _trigger tuples we need to introduce new field space_id as secondary key. Part of #3273.
-
- May 11, 2018
-
-
Ilya Markov authored
Introduce _vsequence system space. Prerequisite of #3250
-
- Feb 09, 2018
-
-
AKhatskevich authored
Making `stat[14]` a system spaces enables us to allow users to create spaces which starts with `_`, because it cannot affect internal state anymore. Since now the only constraints on table names is: - consists of printable symbols only - length < 65k Closes #2126
-
- Oct 06, 2017
-
-
Alexandr Lyapunov authored
Add a new space that contains collation definitions for future index collation and more. Add a collation cache for fast retrieving a collation object by its name. Needed for #2649
-
- Sep 26, 2017
-
-
Vladimir Davydov authored
The value returned by space.auto_increment() is not guaranteed to be monotonically growing, because this method uses max+1 for the next generated value, which can be less than a value generated before in case the max key is deleted. Besides, calling max() may be expensive, e.g. it requires a disk access in case of Vinyl. So this patch implements auto increment based on persistent sequences. To be used for auto increment, a sequence needs to be attached to a space. To attach an existing sequence to a space, pass 'sequence=ID' in index options when creating or modifying the primary key. Here ID is the name or the numeric identifier of the sequence to attach. Note, sequences can be attached only to spaces with integer primary key. After a sequence is attached, it will be used for auto increment when the user passes 'nil' for the primary key value. If the user passes a value different from 'nil', the value will be used to update the attached sequence. To detach a sequence from the space it was attached to, either drop the primary key of the space or alter the primary key with 'sequence=false'. It is not necessary to pre-create a sequence to use it for auto increment - a sequence can be automatically generated. To generate a sequence automatically, pass 'sequence=true' in index options. Automatically generated sequences are named '_auto_ID', where ID is the space id, and removed when the space is dropped or the sequence is detached. A sequence cannot be dropped as long as it is attached to any spaces. Closes #389
-
- Sep 19, 2017
-
-
Vladimir Davydov authored
This patch implements a new object type, persistent sequences. Sequences are created with function box.schema.sequence.create(name, options). Options include min/max, start value, increment, cache size, just like in Postgresql, although 'cache' is ignored for now. All sequences can be accessed via box.sequence.<name>, similarly to spaces. To generate a sequence value, use seq:next() method. To retrieve the last generated value, use seq:get(). A sequence value can also be reset to the start value or to any other value using seq:reset() and seq:set() methods. Needed for #389
-
- Jul 20, 2017
-
-
Roman Tsisyk authored
Closes #2543
-
- Jun 21, 2017
-
-
Vladimir Davydov authored
Currently, space.create must insert an entry into 'truncate' system space - if it does not, space.truncate won't work. This is incontinent, as it makes it impossible to create spaces by simply inserting a tuple into the 'space' system space via iproto API. So let's insert entries into truncate space lazily, on the first space truncation. Closes #2524
-
- Jun 08, 2017
-
-
Kirill Yukhin authored
Persistency for SQL triggers supported by introducing new system space called `_trigger` which should store all SQL triggers registered. Add space itself, make visible to Lua, update bootstrap code and regenerate bootstrap.snap. Insertion into the space is done by introducing new VDBE opcode `OP_ParseSchema3` which provides a pair of trigger name and SQL which creates the trigger. During system restore `_trigger` is scanned and its contents parsed back into VDBE. Update tests and extend test for persistency w/ trigger case. Closes #2320
-
Vladimir Davydov authored
Space truncation that we have now is not atomic: we recreate all indexes of the truncated space one by one. This can result in nasty failures if a tuple insertion races with the space truncation and sees some indexes truncated and others not. This patch redesigns space truncation as follows: - Truncate is now triggered by bumping a counter in a new system space called _truncate. As before, space truncation is implemented by recreating all of its indexes, but now this is done internally in one go, inside the space alter trigger. This makes the operation atomic. - New indexes are created with Handler::createIndex method, old indexes are deleted with Index::~Index. Neither Index::commitCreate nor Index::commitDrop are called in case of truncation, in contrast to space alter. Since memtx needs to release tuples referenced by old indexes, and vinyl needs to log space truncation in the metadata log, new Handler methods are introduced, prepareTruncateSpace and commitTruncateSpace, which are passed the old and new spaces. They are called before and after truncate record is written to WAL, respectively. - Since Handler::commitTruncateSpace must not fail while vylog write obviously may, we reuse the technique used by commitCreate and commitDrop methods of VinylIndex, namely leave the record we failed to write in vylog buffer to be either flushed along with the next write or replayed on WAL recovery. To be able to detect if truncation was logged while recovering WAL, we introduce a new vylog record type, VY_LOG_TRUNCATE_INDEX which takes truncate_count as a key: if on WAL recovery index truncate_count happens to be <= space truncate_count, then it it means that truncation was not logged and we need to log it again. Closes #618 Closes #2060
-
- Apr 07, 2017
-
-
bigbes authored
Add "--replica=replica_id" option to `play` and `cat` commands. Fixes #2301
-
- Apr 05, 2017
-
-
lenkis authored
Closes #1488
-
- Mar 09, 2017
-
-
Georgy Kirichenko authored
Plain vinyl options. Rename memtx memory options and remove GB scale. Rename replication source, log* and no_panic_* options.
-
- Feb 01, 2017
-
-
bigbes authored
closes gh-1925
-
- Jan 31, 2017
-
-
bigbes authored
-
- Jan 18, 2017
-
-
bigbes authored
closes gh-2017
-
- Jan 13, 2017
-
-
bigbes authored
Closes #1925
-
- Nov 14, 2016
-
-
bigbes authored
* added argparse module. Internal, for now (internal.argparse) * added cat/play commands for tarantoolctl (with tests)
-
- Apr 01, 2016
-
-
bigbes authored
+ closes gh-1405 (right path for unix socket) + wrap box.cfg and loadfile with pcall + some variable/function scope cleanups (global -> local) + closes gh-1409 (check for lua syntax before running/restarting/eval server)
-
- Feb 05, 2016
-
-
Roman Tsisyk authored
-
Roman Tsisyk authored
-