mirror of
https://github.com/qdrant/qdrant.git
synced 2026-08-06 10:00:58 -05:00
* [manual] live reload functions for gridstore-read * [AI] tests for life reload * fmt * Address CodeRabbit review (PR 8287) - gridstore/mod: acquire pages read lock once in files() loop - universal_io/mmap: use fs_err::exists() to propagate IO errors - pages: fix live_reload last_page_id underflow when pages is empty Made-with: Cursor * review changes * thx coderabbit --------- Co-authored-by: Cursor Agent <agent@cursor.com> Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
gridstore
New storage for variable-sized values using mmap.
Design
- IDs are sequential integers, starting at 0.
- The storage is divided into file pages of fixed size (32MB).
- Data can be written and read across multiple pages.
- Those pages are mapped into memory using mmap.
- Data units are blocks of fixed size (128 bytes).
- Values span an integer number of contiguous blocks.
- Values are compressed with lz4
- Each block is mapped to a bit in the bitmask.
- A region is a fixed number of contiguous blocks.
- Gaps of free blocks in each region are tracked in a file.
- Deletes mark the block as deleted (in-memory) & updates their region
- Updates:
- not done in place, always a new value is inserted
- calculation of the new regions gaps is done on the fly
- the tracker is updated in-memory, only persisted on flush
- Supports multiple threads reading and single thread writing
- One file per page, one file for tracker, one file for bitmask, and one file for gaps.
TODOs
- dictionary compression to optimize payload key repetition
- validate the usage with a block storage via HTTP range requests