- Sep 25, 2017
-
-
Vladimir Davydov authored
- Use 'static inline' instead of 'inline' - Move GROW_INCREMENT enum out of LIGHT(record) struct
-
Vladimir Davydov authored
So as not to confuse the user, let's start reader threads when recovery completes only if there are Vinyl indexes. Otherwise, start them on the first Vinyl index creation. See #2664
-
Vladimir Davydov authored
Vinyl starts its worker threads on checkpoint, even if there is no Vinyl spaces to dump out there. This is a mess. Let's wake up the scheduler only if we actually have something to dump. BTW, this patch removes that annoying 'vinyl checkpoint done' message in case nothing was dumped. See #2664
-
Vladimir Davydov authored
Introduce the following functions: vy_scheduler_begin_checkpoint() vy_scheduler_wait_checkpoint() vy_scheduler_end_checkpoint() and make the Vinyl API methods use them instead of playing with the scheduler directly. Rationale: - It will help move the scheduler to a separate file in future. - We want to avoid waking the scheduler on checkpoint if Vinyl is not used, because the scheduler starts worker threads on the first wakeup. At the same time, we have to call vy_log_rotate() on checkpoint no matter if Vinyl is used or not (it needs to update its internal housekeeping). Factoring out the scheduler functions will allow to achieve this goal neatly.
-
Vladimir Davydov authored
There's no point in maintaining the LSN of the last checkpoint in Vinyl, we have checkpoint_last() for retrieving it. Make this helper a little bit more friendly by allowing to omit vclock argument and use it wherever appropriate. Here's why I need to do that now. I'm planning to omit calling scheduler checkpoint functions altogether if there's nothing to dump (so as not to start worker threads and print 'vinyl checkpoint done' message in case Vinyl is not used), but one of those functions updates last_checkpoint, which other pieces of code (gc primarily) relies on. I could factor last_checkpoint out of vy_scheduler, but why if I can simply use checkpoint_last() instead.
-
Vladimir Davydov authored
Currently, box_set_checkpoint_count() not only changes the corresponding configuration option, but also invokes garbage collection. The problem is it is called in the beginning of box_cfg(), before recovering engine data. At that time engines are not ready to invoke garbage collection (e.g. Vinyl hasn't scanned vylog directory yet). Besides, the server might be started in the hot standby mode, in which case calling garbage collection is obviously wrong. To fix this, we could somehow detect if box_set_checkpoint_count() is called from box_cfg() and avoid invoking the garbage collector if so, but I think it isn't worth it. Instead let's just not invoke garbage collection when this option changes. It's not a big deal - old files will be removed by the next snapshot anyway.
-
Vladimir Davydov authored
It's inappropriate to fail startup if the vinyl data directory does not exist, because vinyl might not even be in use. Move the check to the time when a vinyl index is opened. See #2664
-
Vladimir Davydov authored
If an index is dropped while a dump/compaction task is in progress, the task will be aborted, but VY_LOG_DROP_RUN record won't be written to the metadata log so the run will remain incomplete (VY_LOG_PREPARE_RUN) and pin the dropped index in the log until the server is restarted and all incomplete runs are purged. This results in occasional failures of the vinyl/gc test which checks that vylog files are removed after all vinyl spaces are dropped. There's actually no reason not to log deletion of an incomplete run that belongs to a dropped index so let's do this to fix this problem. Closes #2486
-
Vladimir Davydov authored
So that BPS tree can be redefined in files that include memtx_tree.h
-
- Sep 22, 2017
-
-
Roman Tsisyk authored
Fixes #2761
-
Roman Tsisyk authored
Apple's version of libcurl is outdated and buggy. Use libcurl from homebrew by default. Closes #2772
-
Eugene Leonovich authored
queue.start() is not needed anymore.
-
Roman Tsisyk authored
Follow up the previous commit.
-
Vladimir Davydov authored
The cache iterator restoration function is muddy and suboptimal: - If last_stmt equals NULL, it doesn't attempt to change the iterator position although it should restart the iterator. Moreover, it doesn't even check EQ condition in this case, i.e. it may return a statement that doesn't satisfy the search criteria. - It may restore iterator position to last_stmt, but the restoration semantics mandates that the returned statement must be strictly greater than last_stmt if the iterator was restored. - If the iterator was invalidated, it first positions the iterator to the last known position (curr_stmt) and then steps back to the statement closest to last_stmt although it could jump to last_stmt immediately. Let's rewrite it.
-
Vladimir Davydov authored
vy_merge_iterator_squash_upserts() returns an UPSERT, which is then converted to a REPLACE by vy_read_iterator_next(). Fold the latter into the former to make the workflow easier to follow. Also, remove useless suppress_error argument.
-
Vladimir Davydov authored
Not only restore() callback can restore the iterator position after the source changed - next_key() and next_lsn() can do that too, which brings additional complexity. Do we really need it? Not really: - We can avoid handling restoration in next_key() by simply calling restore() before it. This is cheap as restore() is a no-op if the source was not changed. - Regarding next_lsn() - when it comes to calling it, we iterate over sources from the most recent one to the oldest, which means that the only sources out there that may yield, on-disk runs, are guaranteed to be iterated last, after all mutable sources (txw, cache, mems), so none of the mutable sources needs to be restored in this case. Simplify the read iterator as per above.
-
Vladimir Davydov authored
Currently, ->next_lsn() may be (and actually is) called right after opening the iterator, which means that apart from advancing the iterator to the next version of the same statement it has to handle the case of starting iteration. This complicates the callback semantics so let's require ->next_key() to be called first.
-
- Sep 21, 2017
-
-
Roman Tsisyk authored
Closes #2774
-
- Sep 20, 2017
-
-
Vladimir Davydov authored
We generally do not allow to drop objects that have dependents.
-
Vladimir Davydov authored
In contrast to PostgreSQL, this method doesn't make sense in Tarantool, because we don't have sessions.
-
- 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
-
Vladimir Davydov authored
Currently, it is done by space_cache_replace/delete which violates incapsulation. Let's introduce a trigger that is fired after a change in a space definition is committed and use it to propagate changes to Lua. Patch by @kostja.
-
lenkis authored
-
Vladimir Davydov authored
-
- Sep 18, 2017
-
-
Konstantin Osipov authored
Implement a helper function to swap space triggers. Patch by @locker.
-
Georgy Kirichenko authored
Speed up zstd as much as possible.
-
Georgy Kirichenko authored
Update zstd submodule to v1.3.1 version.
-
Georgy Kirichenko authored
Needed to implement SMTP client on the top of libcurl. See #2704
-
Vladimir Davydov authored
We can't call initial() from 1.7.6+ because of the space format checks. Port initial_1_7_5() from 1.8 and use it to boostrap.
-
Vladislav Shpilevoy authored
Coverity Scan has found a possible bug in a CSV parser - dereferencing of a null pointer. But it is not possible. Lets explain: According to Coverity, the null dereference is in CSV_IN_QUOTES processing in csv_parse_impl. But bufp (nullified pointer) can be set to null only in two cases: CSV_NEWFIELD and CSV_OUT_OF_QUOTES. In a case of CSV_NEWFIELD the parser sets the state to CSV_LEADING_SPACES and on a next iteration it sets bufp to not null. In a case of CSV_OUT_OF_QUOTES the parser can nullify bufp only if is_end_of_line was true at the end of 'out_of_quotes' processing. But it means, that is_end_of_line was true at the beginning of processing too, because CSV_OUT_OF_QUOTES does not modify it. And at the beggining, if is_end_of_line was true, then the state is set to CSV_LEADING_SPACES. And on a next iteration bufp are set to not null. Closes #2692
-
Roman Tsisyk authored
-
Vladislav Shpilevoy authored
Closes #2754
-
Vladislav Shpilevoy authored
Needed for #2754
-
Vladislav Shpilevoy authored
-
Roman Tsisyk authored
-
- Sep 15, 2017
-
-
Vladislav Shpilevoy authored
sc_space_new return value always is unused. Make sc_space_new return void.
-
Vladislav Shpilevoy authored
Needed for #2754
-
Vladislav Shpilevoy authored
Version is needed in #2754 to ignore space format, if schema version < 1.7.6.
-
Roman Tsisyk authored
Needed for #2754
-
Vladislav Shpilevoy authored
Needed to get format fields during alter in #2754
-