-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: Add bpop cmd #48
base: unstable
Are you sure you want to change the base?
Conversation
WalkthroughThe changes introduce new methods and classes to enhance the functionality of the Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant BaseCmd
participant KiwiDB
Client->>BaseCmd: Request to Block Client
BaseCmd->>KiwiDB: BlockThisClientToWaitLRPush(keys, expire_time, client, type)
KiwiDB-->>BaseCmd: Client Blocked
BaseCmd->>Client: Confirmation of Blocking
Client->>BaseCmd: Request to Unblock Client
BaseCmd->>KiwiDB: ServeAndUnblockConns(client)
KiwiDB-->>BaseCmd: Connections Unblocked
BaseCmd->>Client: Confirmation of Unblocking
Poem
Recent review detailsFiles selected for processing (9)
Note Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
增加blpop和brpop指令,步骤为下 |
@@ -106,6 +106,91 @@ BaseCmd* BaseCmdGroup::GetSubCmd(const std::string& cmdName) { | |||
return subCmd->second.get(); | |||
} | |||
|
|||
void BaseCmd::BlockThisClientToWaitLRPush(std::vector<std::string>& keys, int64_t expire_time, PClient* client, |
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.
BlockThisClientToWaitLRPush 这个方法没有看到哪里有调用
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.
看 pika 那边用到了这个方法, 可以补齐
Summary by CodeRabbit
Release Notes
New Features
BLPop
andBRPop
commands for blocking list pop operations.Bug Fixes
Documentation
These enhancements improve the efficiency and responsiveness of client interactions with the system.