- May 25, 2017
-
-
Georgy Kirichenko authored
Fiber attributes are a way to specify parameters that is different from the default. When a fiber is created using fiber_new_ex(), an attribute object can be specified to configure custom values for some options. Attributes are specified only at fiber creation time; they cannot be altered while the fiber is being used. Currently only stack_size attribute is supported. Fibers with non-default stack size won't be recycled via fiber pool. API overview: * fiber_new_ex() creates a fiber with custom attributes. * fiber_attr_new()/fiber_attr_delete() creates/destroys attributes. * fiber_attr_setstacksize()/fiber_attr_getstacksize() sets/gets the fiber stack size. * fiber_self() returns current running fiber. All new functions are available from public C API for modules. See #2438
-
Roman Tsisyk authored
Generate random names for temporary FFI structures. Follow up #1701
-
- May 24, 2017
-
-
Vladislav Shpilevoy authored
During converting upsert into replace the vy_stmt_new_replace_from_upsert doesn't copy field_map of the source statement. It led to segfault in comparators during access to the broken field_map. Fixes #2461
-
Vladislav Shpilevoy authored
Now Tarantool doesn't support NaN's on indexed positions. Lets allow their indexing. According to the IEEE 754 the double has the following format: +------+----------+----------+ | sign | exponent | fraction | +------+----------+----------+ 1 bit 11 bit 52 bit If the exponent is 0x7FF, the value is special one whether of sign bit. Special value can be NaN, +inf or -inf. If the fraction == 0, the value is inf, which sign depends on the first bit. If the first bit of the fraction is 1, the value is quiet NaN (qNaN), and else the signaling NaN (sNaN). Lets compare their in the order: sNaN < qNaN < -inf < normal number < +inf; sNaN == sNaN; qNaN == qNaN; aNaN != qNaN; -inf == -inf; +inf == +inf; Closes #1701
-
Vladislav Shpilevoy authored
-
Vladislav Shpilevoy authored
-
Vladimir Davydov authored
The quota may be exceeded even if all in-memory trees are empty, because quota is used by pending transactions. If this happens, the scheduler will keep dumping empty trees in a tight loop w/o yielding, thus not even letting pending transactions to fail on timeout. Fix this by adding a sanity check to vy_scheduler_peek_dump() assuring there's something we can dump before proceeding to scheduling a task.
-
Vladimir Davydov authored
vy_index->space is zeroed on index drop, so we have to be extremely careful about how to use it, e.g. we can't dereference it in a dump task, while currently we do, which can result in a crash. Actually, vy_index->space is only used for retrieving the primary key, so having a pointer to the whole space in a vy_index is kinda superfluous - a primary key would be enough. That being said, this patch replaces the space field with the pk field in the vy_index struct. vy_index->pk is referenced by each secondary index so it's safe to use it wherever we want. Also, add a test dropping a space in the middle of dump - w/o this patch it leads to a crash.
-
Vladimir Davydov authored
-
Vladimir Davydov authored
There's no point in preallocating memory on creation of a bitset_index object, it only encumbers usage of it in functions that cannot fail, e.g. on memtx index creation.
-
Georgy Kirichenko authored
In some cases a xlog file can have some data after EOF marker. Set XLOG_CURSOR_EOF flag for xlog cursor only when there are no more data after EOF marker. Closes #2460
-
Georgy Kirichenko authored
Check properly the return value of a xlog_cursor_find_tx_magic(). See #2460
-
Georgy Kirichenko authored
Negating unsigned size_t value and then casting it to signed off_t type is very bad idea. On 32-bit platforms size_t is unsigned 32-bit type, whereas off_t is signed 64-bit type. See #2460
-
Vladimir Davydov authored
Slices make range size estimation inaccurate. This may lead to the coalesce test hang waiting for all ranges to be coalesced in case the estimated sum range size turns out to be greater than the threshold (range_size / 2). To make sure it never happens, let's make the test more aggressive: let it not only delete 90% keys, but also strip the rest of padding.
-
Konstantin Osipov authored
We don't have any intermediate log level between INFO and DEBUG. INFO level should be used for rare events, such as becoming a master or accepting a replica join. INFO is the default level. We lack a log level for "hard to debug" situations, usable by system administrators. Introduce a new new log level for this purpose, VERBOSE, for verbose output. This change should not affect any existing installations. Update module-api.c test. Fixes gh-2467.
-
- May 23, 2017
-
-
bigbes authored
Follow up #2254
-
bigbes authored
Since we've switched to Type=notify, forking isn't more needed. Disable `background = true` in tarantoolctl to avoid potential problems with fork detection by systemd. Closes #2437
-
Vladislav Shpilevoy authored
Fixes #2423
-
Vladislav Shpilevoy authored
vy_mem_iterator_restore() is incorrect when the following two conditions are both met: a) Some key was prepared, but hasn't been committed yet b) vy_mem_iterator is started and hasn't finished yet Try to fix it by adding a new condition to mem_restore invariant. See #2423
-
- May 22, 2017
-
-
Georgy Kirichenko authored
* Fix compilation warnings on abs() * Fix problems on OS X and CentOS 6 * Disable this test with -DENABLE_GCOV=ON Closes #2429
-
Georgy Kirichenko authored
Remove fiber from cord->dead and cord->alive lists on fiber_destroy(). Refactoring for #2437
-
Georgy Kirichenko authored
* Merge `struct tarantool_coro` into `struct fiber` * Delete coro.c and coro.h files. Refactoring for #2438
-
bigbes authored
Original behavior can be enable with `./test-run -j -1` See https://github.com/tarantool/test-run/issues/56
-
Roman Tsisyk authored
Follow up previous commits. No semantic changes.
-
Roman Tsisyk authored
Disable tuple_hash() optimization for non-sequential keys. See #2084
-
Ilya authored
* Refactor templates in tuple_compare.cc to generate optimized versions for various field types * Add a function pointer in key_def to select optimized version at runtime Fixes #2084
-
Ilya authored
* Implement tuple_extract_key_sequential() for sequential keys * Add a function pointer to in key_def to select optimized version at runtime Closes #2048
-
- May 19, 2017
-
-
Vladimir Davydov authored
It uses error injection which is compiled out for release builds. Also, improve the test output by adding s:count() after each space modification for checking if the statement was actually inserted.
-
- May 18, 2017
-
-
Konstantin Osipov authored
* update comments, messages * add a test for changing index id
-
Vladislav Shpilevoy authored
-
Vladislav Shpilevoy authored
Allow to alter any index opts which don't change key_def of the index. Closes #1931 Closes #2109 Closes #2149
-
Alexandr Lyapunov authored
Needed for extractiong write iterator to a separate file. Also move stat account from the function to caller code. Change-Id: I73af73e6a34f9d7431a3c8056030c9858226b0ad
-
Roman Tsisyk authored
time_t is long on all major platforms, not int. Fixes #2443 Change-Id: I7ca029ccfe87124bdc7cdd2ee1db06404f38fe39
-
Konstantin Osipov authored
Simplify check_param_table() arguments in index.create() and index.alter().
-
Vladislav Shpilevoy authored
Closes #2148 Change-Id: I10d8d93a12e8bbd91c36f6eefc0f0e8e07636de5
-
- May 17, 2017
-
-
Vladimir Davydov authored
Currently, only keys from vy_log_key_mask[type] may be present in a record of the given type. Extra keys will result in an error. In order to rework space truncate, we will have to add a new key for VY_LOG_CREATE_INDEX record (space_version). To be able to start from vylog generated by an older version, we need to allow extra keys. So this patch deletes vy_log_key_mask[] and makes vy_log_record_encode() encode only those keys whose value is different from the default one (similarly to request_encode()). Checking for mandatory keys is now up to vy_recovery_process_record() (currently there's the only that needs to be checked - VY_LOG_KEY_DEF)
-
Vladimir Davydov authored
vy_recovery_iterate() doesn't clean vy_log_record before proceeding to the next log entry. As a result, a run record passed to the callback by vy_recovery_iterate() contains extra info left from the index this run is for: index_lsn, index_id and space_id. We use this in gc and backup callbacks to format file name. The problem is vy_recovery_iterate() is also used internally for log rotation. Including extra keys in records doesn't result in writing them to the log file on rotation, because per each record type we have a mask of keys corresponding to the record (vy_log_key_mask). In order to allow optional keys in vylog, the following patch will change the meaning of the mask so that it only contains mandatory keys, while a key will be written to the log only if its value differs from the default (similarly to request_encode). Thus, to avoid writing keys not relevant to a record type we need to clean vy_log_record within vy_recovery_iterate() before jumping to the next record. So this patch weans gc and backup from exploiting this feature - let them save index_id and space_id in the context, as we do on replication and recovery.
-
Vladislav Shpilevoy authored
Info_append_double is needed to print vinyl index.info.bloom_fpr later.
-
Vladimir Davydov authored
It was helpful when a vinyl index could have a custom path. Currently, it's forbidden, so we can format index path in place.
-
Vladimir Davydov authored
We can format it in place when needed.
-