- Mar 06, 2018
-
-
Vladimir Davydov authored
vy_run_iterator_load_page() keeps two most recently read pages. This makes sense, because we often probe a page for a better match. Keeping two pages rather than just one makes sure we won't throw out the current page if probing fails to find a better match. What doesn't make sense though is cache promotion logic: we keep promoting the page containing the current key. The comment says: /* * The cache is at least two pages. Ensure that * subsequent read keeps the cur_key in the cache * by moving its page to the start of LRU list. */ vy_run_iterator_cache_touch(itr, cur_key_page_no); The comment is quite misleading. The "cache" contains at most two pages. Proudly calling this travesty of a cache LRU is downright ridiculous. Anyway, touching the current page will simply swap the two cached pages if a key history spans less than two pages, resulting in no performance gain or loss whatsoever. However, if a key history spans more than two pages, it will evict a page that is about to be read. That said, let's get rid of this piece of crap.
-
Vladimir Davydov authored
vy_run_iterator_next_key() has to special-case LE/LT for the first and the last page. This is needed, because this function is used by vy_read_iterator_seek() for starting iteration. Actually, there's no point for vy_read_iterator_seek() to use vy_read_iterator_next_key() - vy_read_iterator_next_pos() + vy_read_iterator_find_lsn() would be enough. Bearing this in mind, simplify vy_run_iterator_next_key().
-
Konstantin Osipov authored
-
- Mar 05, 2018
-
-
Vladislav Shpilevoy authored
Inside a docker 'Connection refused' error turns into 'Cannot assign requested address' - because of it netbox test fails, which searches for 'Connection refused' in logs. Let search for both. Follow up #3164
-
Vladislav Shpilevoy authored
When reconnect fails, it prints error to log. But reconnect can fail again and again very many times until the connection is closed. Lets print the first error message under warn log level, and the following ones under verbose log level until error will not be changed. Closes #3175
-
Vladislav Shpilevoy authored
If a connection has reconnect_after > 0, then it is never deleted until it is explicitly closed or reconnect_after is reset. It is because worker fiber of such connection holds all references during yield. Fix it by do not waiting for a next reconnection inside a state machine - protocol_sm() function must not be infinite in a case of error. Closes #3164
-
Konstantin Osipov authored
-
imarkov authored
When fio.read from multiple fibers is performed, as fio.read yields before performing actual read operation and ibuf shared among several fibers may be corrupted and read data is mixed. The fix is to create new ibuf for each fio.read call in case buffer is not specified. Closes #3187
-
- Mar 01, 2018
-
-
Konstantin Osipov authored
-
Konstantin Osipov authored
-
Konstantin Osipov authored
-
imarkov authored
* Add test on usage run_triggers inside before_replace. Test verifies that other before_replace triggers within the same space will be executed but other triggers won't. * Add test on return old in before_replace. Test verifies that other before_replace triggers will be executed, but insertion won't take place and other triggers will be ignored. Closes #3128
-
Konstantin Belyavskiy authored
Fix problem: cannot connect to unix binary socket using authentication. To solve this issue update our uri parser to support following schema: login:password@unix/:/path1/path2/path3 Add tests Closes: #2933
-
Konstantin Osipov authored
If curl does not have SSL support, don't panic, honor CURL_FIND_REQUIRED variable, and panic only if it's set. Correct the grammar in the error message.
-
Konstantin Belyavskiy authored
On MAC several old curl versions don't support SSL by default. Try to check it and print error message if so. Close #3065
-
Konstantin Osipov authored
-
Vladislav Shpilevoy authored
Closes #2666
-
Vladislav Shpilevoy authored
When a field type is specified as numbered key, and a name is named key, then the type is ignored. For example: {name = '<name>', '<type>'} - here the '<type>' is ignored and result space format contains 'any' regardless of <type>. Fix tuple format field parsing to take this case into account. Closes #2895
-
Konstantin Osipov authored
-
Konstantin Osipov authored
-
Vladimir Davydov authored
ERRINJ_VY_READ_PAGE and ERRINJ_VY_READ_PAGE_TIMEOUT injections are used by vinyl/errinj test to check that a page read error is handled properly. The cache checks if these injections are enabled and bails out if so. Since commit a31c2c10 ("vinyl: force read view in iterator in autocommit mode"), this is not necessary, because cache is not used unless SELECT is called from a transaction, and the above mentioned test doesn't use transactions. So let's remove the checks. If we ever enable cache for all SELECTs, we can disable cache in the test with box.cfg.vinyl_cache instead of using error injections.
-
Vladimir Davydov authored
Currently, new entries are added to the cache even if the limit is set to 0, which is obviously incorrect. Fix it. This might be useful for debugging and/or performance evaluation. Closes #3172
-
Vladimir Davydov authored
Make box.cfg.vinyl_cache option dynamically configured. If the new value is less than the current cache usage, it will block until it reclaims enough cache entries to fit in the new limit.
-
Konstantin Osipov authored
-
Vladimir Davydov authored
If the user terminates tarantool while compaction is in progress, tarantool won't exit immediately - it will hang until all dump and compaction tasks that are currently in progress are complete, which may take quite a while on large data sets. What is especially funny, once a task has been finished, vinyl will not commit the produced run file in the vylog, because the event loop has already been stopped, and so will delete it after restart and schedule the task anew. This patch makes the scheduler forcefully abort all running tasks as soon as possible. Closes #3166
-
Vladimir Davydov authored
This is pointless as worker threads don't use coio.
-
Vladislav Shpilevoy authored
vy_run_writer incapsulates logic of writing statements to a run. It provides API to write statements one by one. It is needed so that we can abort a run writing task before waiting for it to finish writing the file. Edited by @locker: - add region_truncate() wherever necessary - do not reallocate row index ibuf for each page - remove vy_run_write(), use vy_run_writer directly instead Needed for #3166
-
- Feb 28, 2018
-
-
Georgy Kirichenko authored
If a replica receives some changes then corresponding wal events are generated and relay fiber is waken up before heartbeat timeout. But there may be nothing to send if all changes are from the current relay peer. In this case an applier doesn't receive anything and break a connection. Fixes #3160
-
Vladimir Davydov authored
When iterating over a vinyl index, we move to the next range if the minimal (in terms of the search criteria) statement among all sources is outside the current range - see vy_read_iterator_next_key() and vy_read_iterator_range_is_done(). This is OK for GE/GT/LE/LT, but for EQ/REQ we should also make sure that the next range actually intersects with the search key - if it doesn't, there's no point in iterating to it. We used to have that check, but commit 5e414a73 ("vinyl: read iterator: do not reopen all sources when range is changed") accidentally removed it. As a result, unlimited EQ/REQ requests for partial keys read runs of all ranges and therefore take much longer. This patch brings this check back.
-
- Feb 26, 2018
-
-
Konstantin Osipov authored
Add memory occupied by cached slabs to the size reported by arena_size and arena_used_ratio respectively. This should make memory monitoring easier: if items_used_ratio > 0.9 and arena_used_ratio > 0.9 and quota_used_ratio > 0.9 then we run out of memory end
-
- Feb 25, 2018
-
-
Konstantin Belyavskiy authored
On FreeBSD we have either system iconv (part of libc) or the one in /usr/local. The first one is not fully compatible with Linux/ OSX iconv and both adds specific prefixes to function names. So to use them via Lua FFI mechanism, specific names are required. Proposal fix: Under FreeBSD link with /usr/local/lib/libiconv.so and add prefix. Closes gh-3073.
-
- Feb 22, 2018
-
-
Konstantin Osipov authored
-
Konstantin Osipov authored
-
- Feb 21, 2018
-
-
Konstantin Osipov authored
- Feb 20, 2018
-
-
Vladislav Shpilevoy authored
-
imarkov authored
* Add parser of cookies from 'Set-Cookie' header. * All cookies are stored in response object in cookie table. * The format of each table element is following: resp[key] = {value, {option, ...}}, where key, value is cookie key, value options are array of strings, set-cookie header options, e.g. HttpOnly, Expires=<date>. Closes #2801
-
Ilya authored
* delete old small parser with nginx tested one * functionality is not changed
-
Vladislav Shpilevoy authored
If a key is updated after a secondary index scan, but before a primary index lookup, then ignore this update. Closes #2442
-
Vladislav Shpilevoy authored
If a column is nullable and is the last defined one (via index parts or space format), it can be omited on insertion. Such absent fields are treated as NULLs in comparators and are not stored. Closes #2988
-