feat:Batch refactoring of strongly consistent code#3147
feat:Batch refactoring of strongly consistent code#3147YuCai18 wants to merge 1 commit intoOpenAtomFoundation:feature/consistency_3.5from
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
| std::promise<void> promise; | ||
| task->futures.push_back(promise.get_future()); | ||
|
|
||
| g_pika_server->ScheduleClientPool(&PikaClientConn::ParallelExecRedisCmd, new std::tuple(shared_from_this(), argvs[i], task, i, std::move(promise), cache_miss_in_rtc), false, false); |
There was a problem hiding this comment.
你目前压测的方式,这里的argvs都是一个,只有客户端使用pipeline方式的时候才会大于1.
另外,如果是pipeline的方式压测,你这里的逻辑是把这些命令执行又拆分到同一个线程池,线程池都占满的时候,会不会导致hang住?
| bool window_elapsed = (now_us - leader_election_token) >= timeout_us; | ||
| bool enough_accumulated = ws->accepted.load(std::memory_order_relaxed) >= min_batch_wait; | ||
|
|
||
| if (!window_elapsed && !enough_accumulated) { |
There was a problem hiding this comment.
这里是说没攒够指定时间和个数,就直接return?那不就直接写rocksdb了吗?
There was a problem hiding this comment.
你说的对,这里需要改成“或”,满足一个条件就发送,不能提前返回。
1d9bac4 to
797ffa6
Compare
| g_pika_server->CheckLeaderProtectedMode(); | ||
|
|
||
| // TODO(whoiami) timeout | ||
| s = g_pika_server->TriggerSendBinlogSync(); |
There was a problem hiding this comment.
需要理一下这里为什么 TriggerSendBinlogSync 位置需要换
单线程压测结果:

多线程压测结果:
