Open longfar-ncy opened 1 month ago
这些变更主要涉及将 Redis 命令的操作从直接使用 rocksdb::WriteBatch
转换为使用封装的 Batch
接口。具体包括修改 HIncrby
、HIncrbyfloat
、HMSet
和 HSetnx
四个命令,以及为这些命令添加相应的一致性测试,以确保在批量操作时保持数据的一致性和正确性。
文件 | 修改摘要 |
---|---|
src/storage/src/redis_hashes.cc | 将 rocksdb::WriteBatch 替换为 Batch::CreateBatch 。 |
tests/consistency_test.go | 增加了 HSetnx 、HMSet 、HIncrby 和 HIncrbyfloat 的一致性测试;修改了 SAdd & SRem 的测试以包括一致性检查。 |
sequenceDiagram
participant Client
participant RedisServer
participant Batch
Client->>RedisServer: 请求 HIncrby/HIncrbyfloat/HMSet/HSetnx
RedisServer->>Batch: 使用 Batch::CreateBatch 创建批处理
Batch-->>RedisServer: 返回 Batch 对象
RedisServer->>Batch: 执行 put 和 delete 操作
RedisServer->>Batch: 调用 Batch 的 Commit 方法
Batch-->>RedisServer: 返回 Commit 结果
RedisServer-->>Client: 发送操作结果
在代码的海洋中寻梦, 批处理接口现身跃鱼龙。 增加测试守护一致性, Redis 栈中万变皆从容。 🐇🌟批代码,迎新风。
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
CI 失败 fix 下
Bot detected the issue body's language is not English, translate it automatically.
CI failed fix next
issure: https://github.com/OpenAtomFoundation/pikiwidb/issues/280
Summary by CodeRabbit
HSetnx
、HMSet
、HIncrby
、HIncrbyfloat
、SAdd
和SRem
)的操作一致性和正确性。