Skip to content

Document defer_deletes space option #2763

Open
@TarantoolBot

Description

@TarantoolBot

Product: Tarantool
Since: 2.10.0-beta2
Audience/target: dev
Root document: https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_schema/space_create/
SME: @ locker

Check if there are other use cases for this new option.

Details

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:

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.
Requested by @locker in tarantool/tarantool@b9f6d38.

Metadata

Metadata

Assignees

No one assigned

    Labels

    2.10featureA new functionalityreference[location] Tarantool manual, Reference partvinyl[area] Related to vinyl

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions