-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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: let pika slave support Redis transaction #2441
Conversation
辛苦一并修复下,感谢啦 |
稍后进行修复~ |
40d866d
to
5545593
Compare
@chejinge PTAL |
src/pika_repl_bgworker.cc
Outdated
} | ||
involved_conns = dispatcher->GetInvolvedTxn(table_keys); | ||
for (auto& conn : involved_conns) { | ||
if (auto c = std::dynamic_pointer_cast<PikaClientConn>(conn); c != nullptr) { |
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.
这个函数建议稍微做下代码优化,感觉这个逻辑好乱 好多if else
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.
已优化
OpenAtomFoundation#2422 Signed-off-by: HappyUncle <code4happy@gmail.com>
OpenAtomFoundation#2422 Signed-off-by: HappyUncle <code4happy@gmail.com>
…exec/discard Signed-off-by: HappyUncle <code4happy@gmail.com>
新增了ut @chejinge @AlexStocks PTAL |
Added ut @chejinge PTAL |
…tion#2441)" This reverts commit 43606e5
* fix: pika slave support multi/exec cmd OpenAtomFoundation#2422 Signed-off-by: HappyUncle <code4happy@gmail.com> * fix: pika slave support watch cmd OpenAtomFoundation#2422 Signed-off-by: HappyUncle <code4happy@gmail.com> * test: add replication-test-go, let slave support watch/unwatch/multi/exec/discard Signed-off-by: HappyUncle <code4happy@gmail.com> --------- Signed-off-by: HappyUncle <code4happy@gmail.com>
* fix: pika slave support multi/exec cmd #2422 Signed-off-by: HappyUncle <code4happy@gmail.com> * fix: pika slave support watch cmd #2422 Signed-off-by: HappyUncle <code4happy@gmail.com> * test: add replication-test-go, let slave support watch/unwatch/multi/exec/discard Signed-off-by: HappyUncle <code4happy@gmail.com> --------- Signed-off-by: HappyUncle <code4happy@gmail.com>
* fix: pika slave support multi/exec cmd OpenAtomFoundation#2422 Signed-off-by: HappyUncle <code4happy@gmail.com> * fix: pika slave support watch cmd OpenAtomFoundation#2422 Signed-off-by: HappyUncle <code4happy@gmail.com> * test: add replication-test-go, let slave support watch/unwatch/multi/exec/discard Signed-off-by: HappyUncle <code4happy@gmail.com> --------- Signed-off-by: HappyUncle <code4happy@gmail.com>
修复 issuse:#2422
另外,测试发现 pika slave 执行 watch 后,与 redis 预期也不同。
目前推测是主从复制时没有调用
SetTxnFailedFromKeys
导致,需要确认下这个问题是否需要在此pr一同修复?