Conversation
kv insert and put report affected = 1, so pgwire emits one INSERT 0 1 tag instead of a bare OK; routed response-shaper errors keep their own numeric sqlstate class through numeric_code_to_sqlstate instead of a hardcoded XX000.
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.
Summary
kv
INSERTandPUTwrites reported no affected count, so pgwire emitted a bareOK; a client reads that as zero rows written. Separately, routed response-shaper errors were flattened toXX000at each pgwire shaper call site even when the error already carried a classifying numeric code.affected = 1inexecute_kv_insertandexecute_kv_put, and mapKvOp::Insert,KvOp::Put,KvOp::BatchPutto theINSERTtag (response_shape/types.rs,kv/crud/write_basic.rs);numeric_code_to_sqlstate(pgwire/types/error_map.rsplus the six routing sites) and add the read-path arms it was missing:UNDEFINED_OBJECT,OBJECT_NOT_READY,NOT_FOUND,DATABASE_NOT_FOUND,SQL_NOT_ENABLED,TYPE_MISMATCH,OVERFLOW.Red proof (the test fails on
mainwithout the fix)Validation (local, on this branch)
error_map×2, kv affected counts ×2)cargo fmt --allcargo clippy -p nodedb --all-targets --all-features --profile ci -- -D warningsOne commit; no changes outside the files listed above.