Skip to content

fix(db): synchronize reads of writing segment - #722

Merged
iaojnh merged 1 commit into
alibaba:mainfrom
iaojnh:codex/fix-writing-segment-read-race
Sep 7, 2026
Merged

fix(db): synchronize reads of writing segment#722
iaojnh merged 1 commit into
alibaba:mainfrom
iaojnh:codex/fix-writing-segment-read-race

Conversation

@iaojnh

@iaojnh iaojnh commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@iaojnh
iaojnh merged commit 64942f4 into alibaba:main Sep 7, 2026
20 checks passed
YongqiYin added a commit to YongqiYin/zvec that referenced this pull request Sep 8, 2026
Keep this branch's single-lock segment design and short-lived collection
lock: upstream alibaba#722 holds write_mtx_ shared for the whole query, which starves
the exclusive writer on glibc (measured 6250 -> 12 docs/s with 4 readers,
reproduced 3/3 on pure upstream code). Port the two indexer accessor locks
added by upstream alibaba#726 (get_vector_indexer / get_quant_vector_indexer) so the
merged lock covers everything seg_col_mtx_ did.

Verified on Linux and macOS: 224 / 222 tests green, upstream's stricter
Optimize concurrency test passes 5/5, query transients are zero, and fetch
throughput is ~17x upstream with the writer running at full speed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants