-
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: Improve the RTC process of Read/Write model #2629
base: unstable
Are you sure you want to change the base?
feat: Improve the RTC process of Read/Write model #2629
Conversation
我有个疑问,如果这个命令应该在cache中读取 但是命不中,还是得放入队列吧,只有命中了才不用放入队列 |
I have a question. If this command should be read from the cache but misses, it still has to be put into the queue. Only if it hits, there is no need to put it into the queue. |
src/pika_command.cc
Outdated
if (IsNeedReadCache()) { | ||
ReadCache(); | ||
} | ||
if (is_read() && res().CacheMiss()) { |
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.
读命令并且没有命中,不去读DB直接返回时为什么
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.
没有命中就回走正常逻辑,把命令扔队列里
std::shared_ptr<Cmd> c_ptr = g_pika_cmd_table_manager->GetCmd(opt); | ||
|
||
if (PIKA_CACHE_NONE != g_pika_conf->cache_mode()){ | ||
if ( c_ptr && c_ptr->is_cacheread() ){ |
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.
这里需要判断cache的状态
,fix go test error in MacOS and cache mode judge
5105513
to
948a9f5
Compare
@CodiumAI-Agent /review |
PR Review 🔍
Code feedback:
|
@CodiumAI-Agent /improve |
PR Code Suggestions ✨
|
about: #2542
改动:在读请求放入队列前,先进行判断是否在cache中读取