fix(vikingdb): trust OpenViking schema for volcengine api_key mode - #2981
Merged
qin-ctx merged 1 commit intoJul 3, 2026
Merged
Conversation
qin-ctx
approved these changes
Jul 3, 2026
This was referenced Aug 5, 2026
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.
Description
The remote VikingDB backend has three configuration modes (Volcengine AK/SK, private VikingDB, and Volcengine API Key). Their handling of the
contentfield, thesearch_tagsfield, and the grep path was previously inconsistent. In particular, the API Key mode cannot fetch the remote collection schema (andget_meta_data()had a bug that usedcontext_collectionas if it were a dict), so that mode could never writecontent/search_tags, andgrep engine=autowould never use the remotesearch_by_keywordspath.This PR makes the API Key mode fully trust the standard OpenViking context schema (treating it as having all fields), aligning its write and retrieval behavior with the AK/SK and private modes. It also adds
ignore_unknown_fields: trueto all data-plane upsert/update/fetch/search requests across the three remote modes, so that writes and reads remain safe and do not fail on unknown fields when the remote schema differs from the local assumption.Related Issue
Type of Change
Changes Made
VolcengineApiKeyCollection.get_meta_data()now returns a trusted standard schema built fromCollectionSchemas.context_collection(...)(includingcontent,search_tags,ScalarIndex, andFullText(content)), fixing the previous bug that called the method as a dict, so that write-field filtering and grep fulltext detection work correctly.ignore_unknown_fields: trueto theupsert_dataandupdate_datarequest bodies of all three remote collections (VolcengineApiKeyCollection/VolcengineCollection/VikingDBCollection).ignore_unknown_fields: trueas a top-level request parameter tofetch_data(fetch_in_collection) and tosearch_by_vector/search_by_id/search_by_multimodal/search_by_random/search_by_keywords/search_by_scalarfor all three collections.ignore_unknown_fieldson write and fetch/search requests; also updated theupdate_search_tagstests to reflect the "fetch the full record by id, then upsert" behavior.Testing
Local verification:
Checklist
Screenshots (if applicable)
Additional Notes
/api/vikingdb/data/*endpoints must support theignore_unknown_fieldsparameter. For older servers that do not recognize it, it is an extra field and should be confirmed to be ignored rather than rejected.delete/aggendpoints are intentionally left unchanged in this PR (their inputs do not involve record fields); they can be unified later if needed.