Document defer_deletes space option
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 15
- Forks
- 49
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 3
Description
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 https://github.com/tarantool/tarantool/commit/b9f6d385840da82f1f0a7963325fe0cff60a293e.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the space_create reference named in the issue and review the linked commit for the defer_deletes behavior and use cases. Document the Vinyl-only option, its secondary-index trade-offs, default value, and example; done means the root reference clearly explains when to use it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100