Skip to content
Snippets Groups Projects
Commit b9f6d385 authored by Vladimir Davydov's avatar Vladimir Davydov Committed by Kirill Yukhin
Browse files

vinyl: disable deferred deletes by default

When the deferred DELETE optimization was introduced, it was enabled for
all Vinyl spaces. Though the optimization  should improve write
performance, at the same time it may result in significant degradation
of reads. Let's disable this optimization by default and add a space
option to enable it.

Closes #4501

@TarantoolBot document
Title: Document defer_deletes space option

The new option is a boolean flag that only makes sense for Vinyl spaces
that have secondary indexes. Setting the flag results in deferring
generation of DELETE statements for secondary indexes till compaction of
the primary index. It should speed up writes, because it eliminates a
lookup in the space for REPLACE and DELETE operations. At the same time,
it may result in degradation of reads from secondary indexes, because it
entails an additional lookup in the primary index per each "phantom"
tuple (a tuple that was deleted in the primary index, but not yet in the
secondary index, and hence should be skipped on read).

Example:

```lua
box.schema.space.create('test', {
    engine = 'vinyl',
    defer_deletes = true,
})
```

If omitted on space creation, this option is set to the value of
`box.cfg.vinyl_defer_deletes`, which is false by default.
parent a8b3b267
No related branches found
No related tags found
No related merge requests found
Showing
with 198 additions and 14 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment