Skip to content
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

Pika 支持 Redis 事务 #1446

Closed
yaoyinnan opened this issue May 6, 2023 · 8 comments · Fixed by #1585
Closed

Pika 支持 Redis 事务 #1446

yaoyinnan opened this issue May 6, 2023 · 8 comments · Fixed by #1585

Comments

@yaoyinnan
Copy link
Contributor

基本信息

项目难度:基础
支持语言:中文/英文
项目社区导师:车金鸽
导师联系邮箱:[email protected]
技术领域:C++、NoSQL
开源协议:BSDv3

项目简述

Pika 是一个持久化的海量存储服务,兼容绝大多数 Redis 接口,包括 string、hash、list、zset、set 和 management 接口。解决 Redis 由于存储数据量巨大而导致内存不够用的容量瓶颈。
本项目的主要工作是在 Pika 中实现 MULTI、EXEC、DISCARD 和 WATCH 等 Redis 事务相关命令,允许客户端发送一系列 Redis 命令,并在一次性执行这些命令的同时,实现原子性的操作。通过实现 Redis 事务的功能,提高 Pika 的可用性和可靠性,使得客户端可以在一次性执行多个 Redis 命令的同时,实现原子性的操作,避免中途出现异常导致数据不一致的问题。

项目产出要求

  1. 为题目设计整体的解决方案,定期产出相关文档;
  2. 实现 MULTI、EXEC、DISCARD、WATCH 等 Redis 事务相关的命令;
  3. 测试和验证;
  4. 能够通过 PR 形式提交代码并通过 Pika 社区审核后合并。

项目技术要求

  • 熟悉 C++
  • 熟悉 Redis/Pika 基本使用
  • 熟悉 Redis 事务
@yaoyinnan yaoyinnan added the ospp https://summer-ospp.ac.cn/ label May 6, 2023
@cheniujh
Copy link
Collaborator

cheniujh commented May 6, 2023

申请意向+1
(上面描述是中文,我也就用中文回复了)

@ChanphongGu
Copy link
Contributor

申请意向+1

3 similar comments
@XiaoyuNoFish
Copy link

申请意向+1

@ForestLH
Copy link
Contributor

ForestLH commented May 6, 2023

申请意向+1

@legalh
Copy link

legalh commented May 9, 2023

申请意向+1

ForestLH added a commit to ForestLH/pika that referenced this issue Jun 4, 2023
todo:test txn. Just to verify the feasibility of the program.
Signed-off-by: Hao Lee <[email protected]>
@ForestLH ForestLH mentioned this issue Jun 4, 2023
@yaoyinnan yaoyinnan removed the ospp https://summer-ospp.ac.cn/ label Jun 30, 2023
@yaoyinnan yaoyinnan changed the title [OSPP] Pika 支持 Redis 事务 Pika 支持 Redis 事务 Jun 30, 2023
ForestLH added a commit to ForestLH/pika that referenced this issue Jul 6, 2023
todo:test txn. Just to verify the feasibility of the program.
Signed-off-by: Hao Lee <[email protected]>
@AlexStocks
Copy link
Collaborator

AlexStocks commented Jul 7, 2023

        * 0429 李浩领走该 task 
        * 0527 代码待测试
        * 0603 明天提一下初步 PR,CR一下再完善
        * 0617 henshui 提了建议,在解决中

@AlexStocks
Copy link
Collaborator

AlexStocks commented Jul 7, 2023

      * 0603 代码大概写完了个框架,提一个CR后继续做。
    * 孙建钊,方案已经设计,代码写了一半
      * 0527 代码已写完,待测试
      * 0603 有事未参加周会,进展不知,cjg跟进(确定李浩跟进)
      * 0610 方案已收齐,代码 review
      * 0624 李浩继续跟进,预计两周可以搞定
      * 0708 预计这周提交代码
      * 0729 李浩根据go集成测试框架写测试case
      * 0805 自己写了一部分的go的集成测试,现在有了go的测试case的话,再按照unstable的写一部分吧
      * 0819 代码开发完成,补测试中

ForestLH added a commit to ForestLH/pika that referenced this issue Jul 8, 2023
todo:test txn. Just to verify the feasibility of the program.
Signed-off-by: Hao Lee <[email protected]>
ForestLH added a commit to ForestLH/pika that referenced this issue Jul 9, 2023
todo:test txn. Just to verify the feasibility of the program.
Signed-off-by: Hao Lee <[email protected]>
ForestLH added a commit to ForestLH/pika that referenced this issue Jul 16, 2023
todo:test txn. Just to verify the feasibility of the program.
Signed-off-by: Hao Lee <[email protected]>
@yaoyinnan
Copy link
Contributor Author

写完了,在做测试工作,PR需要review

Mixficsol pushed a commit that referenced this issue Sep 21, 2023
* fix: fix select cmd return inconsistent with redis

Signed-off-by: Hao Lee <[email protected]>

* refactor:modified lock style while involve db level

Signed-off-by: Hao Lee <[email protected]>

* feature:txn basic

Signed-off-by: Hao Lee <[email protected]>

* fix:merge upstream

Signed-off-by: Hao Lee <[email protected]>

* feature:txn udpate

Signed-off-by: Hao Lee <[email protected]>

* feature:add txn for pika(#1446)

todo:test txn. Just to verify the feasibility of the program.
Signed-off-by: Hao Lee <[email protected]>

* update unwatch cmd

Add comments

Signed-off-by: Hao Lee <[email protected]>

* clear watched key when connection closed

Signed-off-by: Hao Lee <[email protected]>

* merge upstream code

Signed-off-by: Hao Lee <[email protected]>

* update

Signed-off-by: Hao Lee <[email protected]>

* feature: add txn for pika completely

Signed-off-by: Hao Lee <[email protected]>

* add set txn failed for modified watch key

Signed-off-by: Hao Lee <[email protected]>

* update:reduce the particle size of the lock in txn

Signed-off-by: Hao Lee <[email protected]>

* chore:remove redundant comment

Signed-off-by: Hao Lee <[email protected]>

* test:add go ci test for txn

Signed-off-by: Hao Lee <[email protected]>

* fix compile error for linux

Signed-off-by: Hao Lee <[email protected]>

* update txn go ci test

Signed-off-by: Hao Lee <[email protected]>

* update txn for block list pop command

Signed-off-by: Hao Lee <[email protected]>

* Improve blpop-related in Redis transactions

Signed-off-by: Hao Lee <[email protected]>

* blpop_txn_fix

* add some test for go test txn

Signed-off-by: Hao Lee <[email protected]>

* update txn integration test

Signed-off-by: Hao Lee <[email protected]>

* txn change class to struct

Signed-off-by: Hao Lee <[email protected]>

* txn:use weak ptr instead of shared ptr in Cmd

Signed-off-by: Hao Lee <[email protected]>

---------

Signed-off-by: Hao Lee <[email protected]>
Co-authored-by: cheniujh <[email protected]>
AlexStocks added a commit that referenced this issue Nov 21, 2023
* Feature/txn (#1585)

* fix: fix select cmd return inconsistent with redis

Signed-off-by: Hao Lee <[email protected]>

* refactor:modified lock style while involve db level

Signed-off-by: Hao Lee <[email protected]>

* feature:txn basic

Signed-off-by: Hao Lee <[email protected]>

* fix:merge upstream

Signed-off-by: Hao Lee <[email protected]>

* feature:txn udpate

Signed-off-by: Hao Lee <[email protected]>

* feature:add txn for pika(#1446)

todo:test txn. Just to verify the feasibility of the program.
Signed-off-by: Hao Lee <[email protected]>

* update unwatch cmd

Add comments

Signed-off-by: Hao Lee <[email protected]>

* clear watched key when connection closed

Signed-off-by: Hao Lee <[email protected]>

* merge upstream code

Signed-off-by: Hao Lee <[email protected]>

* update

Signed-off-by: Hao Lee <[email protected]>

* feature: add txn for pika completely

Signed-off-by: Hao Lee <[email protected]>

* add set txn failed for modified watch key

Signed-off-by: Hao Lee <[email protected]>

* update:reduce the particle size of the lock in txn

Signed-off-by: Hao Lee <[email protected]>

* chore:remove redundant comment

Signed-off-by: Hao Lee <[email protected]>

* test:add go ci test for txn

Signed-off-by: Hao Lee <[email protected]>

* fix compile error for linux

Signed-off-by: Hao Lee <[email protected]>

* update txn go ci test

Signed-off-by: Hao Lee <[email protected]>

* update txn for block list pop command

Signed-off-by: Hao Lee <[email protected]>

* Improve blpop-related in Redis transactions

Signed-off-by: Hao Lee <[email protected]>

* blpop_txn_fix

* add some test for go test txn

Signed-off-by: Hao Lee <[email protected]>

* update txn integration test

Signed-off-by: Hao Lee <[email protected]>

* txn change class to struct

Signed-off-by: Hao Lee <[email protected]>

* txn:use weak ptr instead of shared ptr in Cmd

Signed-off-by: Hao Lee <[email protected]>

---------

Signed-off-by: Hao Lee <[email protected]>
Co-authored-by: cheniujh <[email protected]>

* FNT

* fix:txn compile error in ubuntu (#2128)

Signed-off-by: LeeHao <[email protected]>

* using func instead of class private member (#2130)

* using func instead of class private member

---------

Signed-off-by: Hao Lee <[email protected]>
Signed-off-by: LeeHao <[email protected]>
Co-authored-by: LeeHao <[email protected]>
Co-authored-by: cheniujh <[email protected]>
Co-authored-by: Xin.Zh <[email protected]>
bigdaronlee163 pushed a commit to bigdaronlee163/pika that referenced this issue Jun 8, 2024
* fix: fix select cmd return inconsistent with redis

Signed-off-by: Hao Lee <[email protected]>

* refactor:modified lock style while involve db level

Signed-off-by: Hao Lee <[email protected]>

* feature:txn basic

Signed-off-by: Hao Lee <[email protected]>

* fix:merge upstream

Signed-off-by: Hao Lee <[email protected]>

* feature:txn udpate

Signed-off-by: Hao Lee <[email protected]>

* feature:add txn for pika(OpenAtomFoundation#1446)

todo:test txn. Just to verify the feasibility of the program.
Signed-off-by: Hao Lee <[email protected]>

* update unwatch cmd

Add comments

Signed-off-by: Hao Lee <[email protected]>

* clear watched key when connection closed

Signed-off-by: Hao Lee <[email protected]>

* merge upstream code

Signed-off-by: Hao Lee <[email protected]>

* update

Signed-off-by: Hao Lee <[email protected]>

* feature: add txn for pika completely

Signed-off-by: Hao Lee <[email protected]>

* add set txn failed for modified watch key

Signed-off-by: Hao Lee <[email protected]>

* update:reduce the particle size of the lock in txn

Signed-off-by: Hao Lee <[email protected]>

* chore:remove redundant comment

Signed-off-by: Hao Lee <[email protected]>

* test:add go ci test for txn

Signed-off-by: Hao Lee <[email protected]>

* fix compile error for linux

Signed-off-by: Hao Lee <[email protected]>

* update txn go ci test

Signed-off-by: Hao Lee <[email protected]>

* update txn for block list pop command

Signed-off-by: Hao Lee <[email protected]>

* Improve blpop-related in Redis transactions

Signed-off-by: Hao Lee <[email protected]>

* blpop_txn_fix

* add some test for go test txn

Signed-off-by: Hao Lee <[email protected]>

* update txn integration test

Signed-off-by: Hao Lee <[email protected]>

* txn change class to struct

Signed-off-by: Hao Lee <[email protected]>

* txn:use weak ptr instead of shared ptr in Cmd

Signed-off-by: Hao Lee <[email protected]>

---------

Signed-off-by: Hao Lee <[email protected]>
Co-authored-by: cheniujh <[email protected]>
bigdaronlee163 pushed a commit to bigdaronlee163/pika that referenced this issue Jun 8, 2024
* Feature/txn (OpenAtomFoundation#1585)

* fix: fix select cmd return inconsistent with redis

Signed-off-by: Hao Lee <[email protected]>

* refactor:modified lock style while involve db level

Signed-off-by: Hao Lee <[email protected]>

* feature:txn basic

Signed-off-by: Hao Lee <[email protected]>

* fix:merge upstream

Signed-off-by: Hao Lee <[email protected]>

* feature:txn udpate

Signed-off-by: Hao Lee <[email protected]>

* feature:add txn for pika(OpenAtomFoundation#1446)

todo:test txn. Just to verify the feasibility of the program.
Signed-off-by: Hao Lee <[email protected]>

* update unwatch cmd

Add comments

Signed-off-by: Hao Lee <[email protected]>

* clear watched key when connection closed

Signed-off-by: Hao Lee <[email protected]>

* merge upstream code

Signed-off-by: Hao Lee <[email protected]>

* update

Signed-off-by: Hao Lee <[email protected]>

* feature: add txn for pika completely

Signed-off-by: Hao Lee <[email protected]>

* add set txn failed for modified watch key

Signed-off-by: Hao Lee <[email protected]>

* update:reduce the particle size of the lock in txn

Signed-off-by: Hao Lee <[email protected]>

* chore:remove redundant comment

Signed-off-by: Hao Lee <[email protected]>

* test:add go ci test for txn

Signed-off-by: Hao Lee <[email protected]>

* fix compile error for linux

Signed-off-by: Hao Lee <[email protected]>

* update txn go ci test

Signed-off-by: Hao Lee <[email protected]>

* update txn for block list pop command

Signed-off-by: Hao Lee <[email protected]>

* Improve blpop-related in Redis transactions

Signed-off-by: Hao Lee <[email protected]>

* blpop_txn_fix

* add some test for go test txn

Signed-off-by: Hao Lee <[email protected]>

* update txn integration test

Signed-off-by: Hao Lee <[email protected]>

* txn change class to struct

Signed-off-by: Hao Lee <[email protected]>

* txn:use weak ptr instead of shared ptr in Cmd

Signed-off-by: Hao Lee <[email protected]>

---------

Signed-off-by: Hao Lee <[email protected]>
Co-authored-by: cheniujh <[email protected]>

* FNT

* fix:txn compile error in ubuntu (OpenAtomFoundation#2128)

Signed-off-by: LeeHao <[email protected]>

* using func instead of class private member (OpenAtomFoundation#2130)

* using func instead of class private member

---------

Signed-off-by: Hao Lee <[email protected]>
Signed-off-by: LeeHao <[email protected]>
Co-authored-by: LeeHao <[email protected]>
Co-authored-by: cheniujh <[email protected]>
Co-authored-by: Xin.Zh <[email protected]>
cheniujh added a commit to cheniujh/pika that referenced this issue Sep 24, 2024
* fix: fix select cmd return inconsistent with redis

Signed-off-by: Hao Lee <[email protected]>

* refactor:modified lock style while involve db level

Signed-off-by: Hao Lee <[email protected]>

* feature:txn basic

Signed-off-by: Hao Lee <[email protected]>

* fix:merge upstream

Signed-off-by: Hao Lee <[email protected]>

* feature:txn udpate

Signed-off-by: Hao Lee <[email protected]>

* feature:add txn for pika(OpenAtomFoundation#1446)

todo:test txn. Just to verify the feasibility of the program.
Signed-off-by: Hao Lee <[email protected]>

* update unwatch cmd

Add comments

Signed-off-by: Hao Lee <[email protected]>

* clear watched key when connection closed

Signed-off-by: Hao Lee <[email protected]>

* merge upstream code

Signed-off-by: Hao Lee <[email protected]>

* update

Signed-off-by: Hao Lee <[email protected]>

* feature: add txn for pika completely

Signed-off-by: Hao Lee <[email protected]>

* add set txn failed for modified watch key

Signed-off-by: Hao Lee <[email protected]>

* update:reduce the particle size of the lock in txn

Signed-off-by: Hao Lee <[email protected]>

* chore:remove redundant comment

Signed-off-by: Hao Lee <[email protected]>

* test:add go ci test for txn

Signed-off-by: Hao Lee <[email protected]>

* fix compile error for linux

Signed-off-by: Hao Lee <[email protected]>

* update txn go ci test

Signed-off-by: Hao Lee <[email protected]>

* update txn for block list pop command

Signed-off-by: Hao Lee <[email protected]>

* Improve blpop-related in Redis transactions

Signed-off-by: Hao Lee <[email protected]>

* blpop_txn_fix

* add some test for go test txn

Signed-off-by: Hao Lee <[email protected]>

* update txn integration test

Signed-off-by: Hao Lee <[email protected]>

* txn change class to struct

Signed-off-by: Hao Lee <[email protected]>

* txn:use weak ptr instead of shared ptr in Cmd

Signed-off-by: Hao Lee <[email protected]>

---------

Signed-off-by: Hao Lee <[email protected]>
Co-authored-by: cheniujh <[email protected]>
cheniujh added a commit to cheniujh/pika that referenced this issue Sep 24, 2024
* Feature/txn (OpenAtomFoundation#1585)

* fix: fix select cmd return inconsistent with redis

Signed-off-by: Hao Lee <[email protected]>

* refactor:modified lock style while involve db level

Signed-off-by: Hao Lee <[email protected]>

* feature:txn basic

Signed-off-by: Hao Lee <[email protected]>

* fix:merge upstream

Signed-off-by: Hao Lee <[email protected]>

* feature:txn udpate

Signed-off-by: Hao Lee <[email protected]>

* feature:add txn for pika(OpenAtomFoundation#1446)

todo:test txn. Just to verify the feasibility of the program.
Signed-off-by: Hao Lee <[email protected]>

* update unwatch cmd

Add comments

Signed-off-by: Hao Lee <[email protected]>

* clear watched key when connection closed

Signed-off-by: Hao Lee <[email protected]>

* merge upstream code

Signed-off-by: Hao Lee <[email protected]>

* update

Signed-off-by: Hao Lee <[email protected]>

* feature: add txn for pika completely

Signed-off-by: Hao Lee <[email protected]>

* add set txn failed for modified watch key

Signed-off-by: Hao Lee <[email protected]>

* update:reduce the particle size of the lock in txn

Signed-off-by: Hao Lee <[email protected]>

* chore:remove redundant comment

Signed-off-by: Hao Lee <[email protected]>

* test:add go ci test for txn

Signed-off-by: Hao Lee <[email protected]>

* fix compile error for linux

Signed-off-by: Hao Lee <[email protected]>

* update txn go ci test

Signed-off-by: Hao Lee <[email protected]>

* update txn for block list pop command

Signed-off-by: Hao Lee <[email protected]>

* Improve blpop-related in Redis transactions

Signed-off-by: Hao Lee <[email protected]>

* blpop_txn_fix

* add some test for go test txn

Signed-off-by: Hao Lee <[email protected]>

* update txn integration test

Signed-off-by: Hao Lee <[email protected]>

* txn change class to struct

Signed-off-by: Hao Lee <[email protected]>

* txn:use weak ptr instead of shared ptr in Cmd

Signed-off-by: Hao Lee <[email protected]>

---------

Signed-off-by: Hao Lee <[email protected]>
Co-authored-by: cheniujh <[email protected]>

* FNT

* fix:txn compile error in ubuntu (OpenAtomFoundation#2128)

Signed-off-by: LeeHao <[email protected]>

* using func instead of class private member (OpenAtomFoundation#2130)

* using func instead of class private member

---------

Signed-off-by: Hao Lee <[email protected]>
Signed-off-by: LeeHao <[email protected]>
Co-authored-by: LeeHao <[email protected]>
Co-authored-by: cheniujh <[email protected]>
Co-authored-by: Xin.Zh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants