[Enhance]: Creating a RocksDB instance rewrites the OPTIONS file once per column family
I maintainer di solito rispondono entro 1 giorno
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Affected Component
RocksdbContext::create() in src/db/common/rocksdb_context.cc, used for every new scalar index and FTS RocksDB instance (collection create, every segment rollover, index builds).
Current Behavior
create() adds the column families of a new instance one at a time:
RocksDB's DB::CreateColumnFamily() writes and syncs a complete new OPTIONS file on every call, besides its MANIFEST record. Creating N families therefore writes N OPTIONS files of growing size.
Reproduction on 98aa126 (no source change; main at 7f54d94 does not change this file), macOS arm64: a unit test creates one instance without families and one with 24 families, then compares the newest OPTIONS-<number> file in each directory.
- Without families:
OPTIONS-000007. - With 24 families:
OPTIONS-000055, so the 24 calls took 48 more file numbers. - With one
DB::CreateColumnFamilies()call:OPTIONS-000009.
A collection creates one such instance per segment, with one family per indexed field and index kind, so this cost repeats on create and on every segment rollover.
Desired Improvement
Create all families with one DB::CreateColumnFamilies() call. RocksDB 8.1.1 still writes one MANIFEST record per family, but writes the OPTIONS file once. Durability does not change. The handle order in cf_handles_ and the failure path (destroy the handles created so far, close the database) stay as they are.
Impact
Fewer file writes and syncs on collection create and segment rollover. In a process-crash test that kills the rollover before each file-system mutation, a rollover of a 4-field collection made 249 mutations and 80 syncs on 98aa126, and 132 mutations and 44 syncs with this change plus the seal change in the related issue #798 (both together; not measured separately).
RocksDB's own issue about the per-family OPTIONS rewrite: facebook/rocksdb#12888.
I have a patch of about 30 lines with three tests (CreateWritesOptionsFileOnce, CreateKeepsHandleOrder, CreateFailureLeavesNoOpenHandles) and can open a PR if this approach is welcome.
- Lingua principale
- C++
- Stelle
- 16.3k
- Fork
- 1k
- Merge medio
- 2g 10h
- PR unite (30g)
- 32
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di alibaba/zvec
-
[Feature]: IVF_TIEREDQ index type, with a learned variable-bit codec (25–44% less index memory than `IVF_RABITQ` at equal recall)Forse già presa @richyreachy l’ha presa 7 giorni fa. Apertafeature
alibaba/zvec#909 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Support an opt-in portable x86 FastPFOR build without SSE4.1Forse già presa @egolearner l’ha presa 20 giorni fa. Aperta
alibaba/zvec#875 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[Enhance]: Reduce vector index block fragmentation caused by frequent flushesForse già presa @feihongxu0824 l’ha presa 22 giorni fa. Apertaenhancement
alibaba/zvec#869 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[Performance]:High-selectivity range filter materializes a full bitmap — `bitset_set_list` ~49% CPU, dwarfing the ANN searchForse già presa @zhourrr l’ha presa 22 giorni fa. Apertaenhancement
alibaba/zvec#868 · 13 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[Performance] Warm-query latency on small collections with query() and query_internal_ids() in v0.8.0Forse di nuovo libera @egolearner l’ha presa 33 giorni fa e non c’è nessuna pull request aperta. Aperta
alibaba/zvec#841 · 2 assegnatari ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di alibaba/zvec
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
deepseek-ai/DeepEP#839 ·
I maintainer di solito rispondono entro 6 giorni
-
multilabel_margin_loss returns an unwritten scalar for an empty CPU batch with reduction='sum'Apertabot-triaged module: correctness (silent) module: cpu module: empty tensor module: loss triage review
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 80/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
stephenberry/glaze#3126 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ultravideo/kvazaar#453 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
google-ai-edge/LiteRT-LM#4783 ·
I maintainer di solito rispondono entro 1 giorno