Ingestion lock optimization using caching strategy#852
Open
VoletiRam wants to merge 8 commits intovalkey-io:mainfrom
Open
Ingestion lock optimization using caching strategy#852VoletiRam wants to merge 8 commits intovalkey-io:mainfrom
VoletiRam wants to merge 8 commits intovalkey-io:mainfrom
Conversation
added 8 commits
March 3, 2026 05:13
Replace the single coarse mutex protecting all text index writes with a two-level scheme: a sharded per-word bucket mutex pool for Postings updates and an absl reader-writer lock for tree structural changes. This allows concurrent writes to independent words to proceed in parallel rather than serializing all writer threads. Search reads now hold a shared reader lock and no longer block concurrent writes to existing words. The tree write lock is only acquired when a word is first inserted or fully removed. Signed-off-by: Ram Prasad Voleti <ramvolet@amazon.com>
Remove reader mutex lock on search path. Refactor and rename Signed-off-by: Ram Prasad Voleti <ramvolet@amazon.com>
Signed-off-by: Ram Prasad Voleti <ramvolet@amazon.com>
Add gloabl shared cache abd apply serially at the end to the tree via callback Signed-off-by: Ram Prasad Voleti <ramvolet@amazon.com>
Signed-off-by: Ram Prasad Voleti <ramvolet@amazon.com>
Fix clang issue Signed-off-by: Ram Prasad Voleti <ramvolet@amazon.com>
Fix clang 2 Signed-off-by: Ram Prasad Voleti <ramvolet@amazon.com>
Signed-off-by: Ram Prasad Voleti <ramvolet@amazon.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ingestion lock optimization using caching strategy