fix: refresh embedded seekdb index after upsert#69
Merged
xxsc0529 merged 1 commit intoJul 10, 2026
Conversation
webup
marked this pull request as ready for review
July 10, 2026 06:44
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.
Background
Embedded SeekDB 1.3+ builds vector indexes asynchronously. A caller that writes a record and immediately performs an ANN query can therefore miss that record until the pending index work is flushed.
langchain-oceanbaseexposed this path becauseOceanbaseVectorStorewrites throughpyobvector.ObClient.upsert().ObClient.insert()already flushes the embedded SeekDB index after a successful write, butupsert()did not.Why Fix This in pyobvector
The missing behavior is in pyobvector's shared write primitive, not in LangChain. Aligning
upsert()withinsert()here:_flush_seekdb_index()hook.A future
langchain-oceanbasedependency update can then add an end-to-end embedded HNSW regression test against the released pyobvector fix.Change
Call the existing
_flush_seekdb_index()hook after a successfulObClient.upsert()transaction, matchinginsert()behavior. The hook is already a no-op for non-embedded or unsupported backends, so remote OceanBase behavior is unchanged.Validation
upsert()invokes the embedded refresh hook.The broader embedded suite was attempted but is not counted as validation: the local
pylibseekdb 1.3.0.post2environment fails during table creation before reachingupsert().