- Sep 09, 2016
-
-
Vladimir Davydov authored
Since range_id_max is not updated, indexes created after recovery might get the same ids as recovered ones. If this happens, the next recovery will crash, because there will be two or more identical ids in the range index file.
-
Roman Tsisyk authored
Prepare for #1599
-
Alexandr Lyapunov authored
-
Vladimir Davydov authored
vy_range_redistribute() doesn't work correctly if ranges are not sorted in ascending order.
-
Vladislav Shpilevoy authored
-
Vladimir Davydov authored
vy_task_{dump,compact}_{execute,complete} serve as trivial wrappers for the functions doing real work. Let's fold them to make the code more straightforward. No functional changes intended. While we touch this code, let's also get rid of all the pointless unlikely's - after all the functions are not called from hot paths so there's no point in cluttering the code.
-
Vladimir Davydov authored
This is pure refactoring, isn't supposed to introduce any functional changes.
-
Vladimir Davydov authored
It is only set and never checked.
-
Vladimir Davydov authored
vy_range_lock() is used in order to forbid scheduling two dump or compact operation on the same range, so there's no point in locking and then unlocking new ranges on compact completion, because it is run from the same thread as the scheduler. This is a legacy of the past, when vy_range_compact_commit() was called from a worker thread. Zap it.
-
Vladimir Davydov authored
It's not good to mess them all together in one struct. Let's use a union.
-
Roman Tsisyk authored
Take into account all runs and in-memory index. Follow up bfe23238
-
- Sep 08, 2016
-
-
Konstantin Osipov authored
Add a test case for automatic cursor close on transaction commit/rollback. Fix a coding bug this test exposed. Update comments.
-
Konstantin Osipov authored
Add a test case for gh-1606 "visibility of changes made by a transaction in range queries". These ara basic tests for transaction write set iterators implemented by @a_lyapunov
-
Vladimir Davydov authored
-
Vladimir Davydov authored
As there is ->complete available now, we can release quota from there.
-
Vladimir Davydov authored
We always do after successful vy_run_write(), so let's move the code there.
-
Vladimir Davydov authored
vy_dump_commit() can only be called after successful vy_dump_begin(), which always creates a new run, so the check if (run == NULL) is useless.
-
Vladimir Davydov authored
It doesn't work.
-
Roman Tsisyk authored
This reverts commit 7bc88b06.
-
Konstantin Osipov authored
In case of WAL write error, the transaction was rolled back after successful vy_prepare(). In this case, rollback still tried to remove the tx from the conflict manager. Double deletion lead to crash. Add a test case and do not remove tx twice. Fixes gh-1681 "vinyl: crash in vy_rollback on ER_WAL_IO"
-
Roman Tsisyk authored
Use lsn instead of vlsn in scheduler.
-
Roman Tsisyk authored
Fix regression introduced by f991838a
-
Roman Tsisyk authored
Split pages properly.
-
Roman Tsisyk authored
Store offset of the end of msgpack data in the last offset table entry.
-
- Sep 07, 2016
-
-
Roman Tsisyk authored
* Remove useless ./vinyl/lock and test/vinyl/suite.lua * Fix vinyl/info.test.lua Follow up ca00c503 and 24a5e45b
-
Roman Tsisyk authored
Fixes #1743 Fixes #1749
-
Roman Tsisyk authored
-
Vladimir Davydov authored
All manipulations on range tree are now done from the tx thread, while worker threads only write runs to disk, so the lock is not needed any longer.
-
Vladimir Davydov authored
Call 'begin' from task->execute and 'commit' from task->complete. 'begin' writes runs to the disk, while 'commit' manipulates the range tree, renames range files and updates range index. After this change we don't need index->lock anymore - the next patch gets rid of it. This patch makes vy_task look like a real mess - we probably should keep arguments for different tasks as structs in a union. Also, the wrappers around vy_dump_{begin,commit} as well as vy_range_compact_{begin,commit} doesn't look very helpful. But let's leave mere cleanups and refactoring up to the following patches. Closes #1685
-
Vladimir Davydov authored
Call 'begin' from task->execute and 'commit' from task->complete. 'begin' writes runs to the disk, while 'commit' manipulates the range tree, renames range files and updates range index. This is a step towards removal of index->lock.
-
Vladimir Davydov authored
We need one more operation apart from 'execute'. It is 'complete', which may be used to finish the task from the scheduler context and perhaps schedule another task. So let's switch vy_task to vtable. Note, 'complete' is only called if 'execute' finished successfully.
-
Vladimir Davydov authored
It doesn't work if there are more than 2 sources. The fix is self-obvious. Closes #1725
-
Svyatoslav Feldsherov authored
Fixes #1695
-
Nick Zavaritsky authored
* Internally, libev maintains a list of watchers for each monitored fd. Add ev_io_closing(fd), does ev_feed_event() for each watcher affected. * Add coio_close() [Public API] Wakes all fibers blocked in coio_wait() AND closes the fd. Prerequisite for #886 Non-blocking popen. * Lua socket switched to coio_close(); stop tracking waiters explicitly. * socket ::= { _gc_socket = <ffi:struct gc_socket> }, _gc_socket was previously known as socket. Gc_socket stores the fd in immutable field. * Overall socket module cleanup.
-
Nick Zavaritsky authored
Not a performance bottleneck & ffi is less maintainable.
-
Georgy Kirichenko authored
-
- Sep 06, 2016
-
-
Konstantin Osipov authored
Make run size a function of range size. This makes the races still inherent in vinyl easily exposable. Fix the race by better tracking index version in vy_dump() and protecting vy_read_iterator_open with a read lock over entire index. @todo: * vy_read_iterator_open() is entirely useless exactly because of the race it opens up a window for, a race between open() and get(): get() has to invoke vy_read_check_versions() and *reopen* the iterator again! The iterator API must be reworked to remove a useless call, which has to be invoked on demand anyway. * the race is caused by a broken assertion in the vy_range_tree (range index), because vy_dump adds a new run to a range and updates run page index, which is used for range comparison in the tree. If we change the comparator to use range->minkey, the race will be completely gone, because manipulation with the run list will not affect range->minkey.
-
Konstantin Osipov authored
Transaction write set is key ordered. We don't need to maintain a range list of ranges changed by a transaction - a single range is touched only once when flushed by the write set. Update range planner metrics when the range is changed.
-
Roman Tsisyk authored
Closes: #1739 Closes: #1740
-
Konstantin Osipov authored
* remove dump_age_period; not much added value compared to dump_age itself; * remove dump_wm; dump_wm is a global constant that sets the maximal run size in a range; it must be a function of range size, which is defined per space; it's better to estimate it automatically (we may vary run size depending on the temperature of the run). * remove dump_prio; we're abandoning zone-based scheduler, and this was merely a handle to prioritize dumps of runs in red zone; * provide reasonable defaults for dump_age (40 seconds) and compact_wm (begin merge when there are at least two runs in a range) * update tests
-