fix: warn on invalid protobuf TxnOp and unknown ConditionResult#70
Merged
drmingdrmer merged 1 commit intodatabendlabs:mainfrom Feb 21, 2026
Merged
Conversation
Two silent-fallback behaviors in protobuf-to-native conversion are now
logged:
- `TxnOp` with `request: None` silently becomes `Operation::get("")`.
This masks protocol errors and can produce unexpected data reads.
A warning is now emitted so the issue is observable in logs.
- Unknown `ConditionResult` value (out-of-range i32) silently becomes
`CompareOperator::Eq`, which changes the intended condition semantics.
A warning is now emitted for this case as well.
Both keep the existing fallback behavior for backward compatibility with
persisted raft log entries, but make the anomalies visible to operators.
xp-trumpet
approved these changes
Feb 21, 2026
Collaborator
xp-trumpet
left a comment
There was a problem hiding this comment.
@xp-trumpet reviewed 1 file and all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on drmingdrmer).
There was a problem hiding this comment.
Pull request overview
This PR improves observability in protobuf-to-native conversion by adding warning logs for two silent fallback scenarios. When invalid or missing protobuf data is encountered during deserialization, the system now emits warnings while maintaining backward compatibility with existing raft log entries.
Changes:
- Added warning log when
TxnOphas no request field and silently falls back toOperation::get("") - Added warning log when
ConditionResulthas an unknown/out-of-range value and falls back toCompareOperator::Eq
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Changelog
fix: warn on invalid protobuf TxnOp and unknown ConditionResult
Two silent-fallback behaviors in protobuf-to-native conversion are now
logged:
TxnOpwithrequest: Nonesilently becomesOperation::get("").This masks protocol errors and can produce unexpected data reads.
A warning is now emitted so the issue is observable in logs.
Unknown
ConditionResultvalue (out-of-range i32) silently becomesCompareOperator::Eq, which changes the intended condition semantics.A warning is now emitted for this case as well.
Both keep the existing fallback behavior for backward compatibility with
persisted raft log entries, but make the anomalies visible to operators.