-
Notifications
You must be signed in to change notification settings - Fork 1.1k
chore: Allow JustReply() in cmd-support #6478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces the ability for async command contexts to return immediately without executing any transaction, addressing the need for commands that need to return neither an error nor perform an action (like returning an array of null values). The key addition is the JustReplySentinel type that allows commands to signal they want to reply directly without scheduling any operations.
Changes:
- Added
JustReplySentinelstruct to allow commands to signal immediate reply without execution - Updated
AsyncContextInterface::PrepareResultto includeJustReplySentinelas a third variant option - Modified
RunSyncandRunAsyncto handle the newJustReplySentinelcase - Replaced usage of
SendNotFound()helper method with directMCRendercalls for better consistency - Removed
SendNotFound()helper fromParsedCommandclass
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/server/cmd_support.h | Added JustReplySentinel struct and JustReply() helper method; updated PrepareResult variant to include the new sentinel type |
| src/server/cmd_support.cc | Updated RunSync and RunAsync to handle JustReplySentinel case, allowing immediate replies without blocking |
| src/server/string_family.cc | Replaced SendNotFound() call with direct MCRender::RenderNotFound() usage |
| src/facade/parsed_command.h | Removed SendNotFound() helper method |
🤖 Augment PR SummarySummary: This PR extends the async command-support API to allow contexts to “just reply” without scheduling any transactional work. Changes:
Technical Notes: In deferred-reply mode, the “just reply” path uses 🤖 Was this summary useful? React with 👍 or 👎 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Copilot <[email protected]> Signed-off-by: Vladislav <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
Co-authored-by: Copilot <[email protected]> Signed-off-by: Roman Gershman <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
In case something needs to return neither an error nor perform an action - like return an array of null values, etc