Conversation
The kv engine answered its writes with a bare OK command tag, so a driver parsing the tag read 0 affected rows for a write that landed. The tag now reports the row the write affected: INSERT and PUT answer INSERT 0 1, matching the document engine's point insert. A kv multi-key delete already reported its matched keys.
EnRaiha
force-pushed
the
fix/kv-insert-tag
branch
from
September 19, 2026 05:06
9489405 to
fabdb88
Compare
Member
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.
Why
Key-value writes answered a bare
OKcommand tag: anINSERTorPUTagainst a kv collection reported no affected count, so drivers saw an empty tag whereINSERT 0 1is expected. The count-bearing tag semantics are the kv half of #297.What
data/executor/handlers/kv/crud/write_basic.rs: kvPutandInsertanswer throughresponse_affected(task, 1)— the write reports the row it wrote instead of a bare OK.response_shape/types/plan_kind.rs:KvOp::Insert,KvOp::Put, andKvOp::BatchPutclassify asDmlResult("INSERT"), so the routed response rendersINSERT 0 1rather than an execution tag.sql_dml_affected_countswith the kv INSERT/PUT counts.Refs #297.
Validation
cargo check -p nodedb --all-targets— clean (rebased on currentmain).cargo test -p nodedb --test wire sql_dml_affected_counts— 16 passed.Notes