-
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: support redis transaction #10
base: unstable
Are you sure you want to change the base?
Conversation
WalkthroughThe changes encompass modifications to several files within the codebase, including updates to naming conventions, enhancements in command handling and transaction management, the introduction of new methods and enumerators, and adjustments to configuration files. These alterations collectively improve the functionality and maintainability of the system, particularly in relation to command execution and error handling. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant PTransaction
participant Database
Client->>PTransaction: Watch(key)
PTransaction->>Database: NotifyDirty(key)
Database-->>PTransaction: Acknowledge
PTransaction-->>Client: Confirmation
Recent review detailsFiles selected for processing (12)
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 (
|
@Iam-WenYi 麻煩review一下 |
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.
需要做更多了解才行,现在还不可以下定论。
首先,项目目前是 Kiwi,已经不再是 PikiwiDB,因此注释方面需要调整。
指令方面,建议把 Multi 指令的注释迁移到 Multi 处,不要放在 Watch 处。
其它的话,可以看出这种事务的思路是参考了 Redis 的,即把要处理的任务放到一个队列之中,同时结合了 Kiwi 项目自身任务池的特点来的,但是我个人认为还需要进一步优化,因此还不能够予以通过。
@@ -0,0 +1,194 @@ | |||
/* | |||
* Copyright (c) 2023-present, Qihoo, Inc. All rights reserved. |
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.
Qihoo 、pikiwidb 相关都删了
#11
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Multi
,Watch
,UnWatch
,Exec
, andDiscard
.Bug Fixes
Documentation
Chores