-
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
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. |
5105513
to
948a9f5
Compare
@CodiumAI-Agent /review |
PR Review 🔍
Code feedback:
|
@CodiumAI-Agent /improve |
PR Code Suggestions ✨
|
src/pika_client_conn.cc
Outdated
@@ -272,6 +274,17 @@ void PikaClientConn::ProcessRedisCmds(const std::vector<net::RedisCmdArgsType>& | |||
std::string opt = argvs[0][0]; | |||
pstd::StringToLower(opt); | |||
bool is_slow_cmd = g_pika_conf->is_slow_cmd(opt); | |||
std::shared_ptr<Cmd> c_ptr = g_pika_cmd_table_manager->GetCmd(opt); |
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.
一个优先级比较低的优化点:这个拷贝的c_ptr能否通过异步任务的参数传递到threadPoolWorker让其复用,这样就不用在一次指向链路上从cmd_table上copy两次命令了
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.
这块拷贝猜测大约会损耗多少性能?
感觉没有合适的地方传呢?如果要改,有初步思路吗?
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.
如果要传递,或许可以通过arg传递到线程池。但确实要看一下是否真的对性能有损耗 ,真的有损耗再考虑把。这个可以最后再考虑。
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,可以先以字符串的形式将这些需要拦截的命令放在一个unordered_se中,然后每次我们在这个位置直接用opt去查询set即可,就避免了额外clone一次命令对象的行为。另外,由于我们这个unordered_set是只读的(拦截哪些请求不支持动态修改,只是最开始初始化的时候才会写这个set),我们并发查询这个set时,连锁都不用去加。
resp_num.store(static_cast<int32_t>(argvs.size())); | ||
bool read_status = true; | ||
|
||
for (const auto& argv : argvs) { |
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.
如果有一整个batch进来(pipeline),可能会有些命令命中Cache,有些不命中,这种case可能也需要考虑一下。
另外如果是一个整个batch进来,尤其是pipeline的batch,可以考虑要不要干脆直接放行走线程池? 因为pipeline写一般多一些,而且如果pipeline单个batch命令量很大,当前这个networker也可能会在这耽误一会?
如果让batch直接放行走常规处理路径,其实不但大大降低了实现复杂度,而且一样能满足绝大部分场景的需求(绝大部分场景还是没有用pipeline的,都是一个网络请求中只有一条命令)
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.
对于batch和pipeline,在isCacheRead时把会MUTIL开头的请求过滤,这样就还是走常规处理。
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.
Multi只是告知一个事务的开始,而且multi(事务)包含的一批命令会先被缓存在pika内部(应该是其他地方),而不是一次性发过来的,可能光靠multi判断不了是否是batch哈,batch应该是只有pipeline会有。
我建议这里可以显式地去判断命令是否有多条,有多条就直接放行,这样还有一个好处,就是后面有人再读代码的话,一眼就能看出batch是放行的。
948a9f5
to
1685e3e
Compare
WalkthroughThe changes introduce a new method Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant PikaClientConn
participant Cache
participant CommandProcessor
Client->>PikaClientConn: Send batch commands
PikaClientConn->>Cache: Check cache for commands
alt Commands found in cache
Cache-->>PikaClientConn: Return cached commands
PikaClientConn->>CommandProcessor: Process cached commands
CommandProcessor->>PikaClientConn: Return processed data
PikaClientConn-->>Client: Send response
else Commands not found in cache
PikaClientConn->>CommandProcessor: Process fresh commands
CommandProcessor->>Cache: Cache the commands
CommandProcessor->>PikaClientConn: Return processed data
PikaClientConn-->>Client: Send response
end
Poem
Tip Early access features: enabledWe are currently testing the following features in early access:
Note:
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? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 5
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (6)
- .github/workflows/pika.yml (1 hunks)
- include/pika_client_conn.h (1 hunks)
- include/pika_command.h (3 hunks)
- src/pika_client_conn.cc (3 hunks)
- src/pika_command.cc (7 hunks)
- tests/integration/stream_test.go (1 hunks)
Files skipped from review due to trivial changes (1)
- .github/workflows/pika.yml
Additional comments not posted (9)
src/pika_client_conn.cc (1)
21-21
: Ensure newly included file is necessary and utilized.Verification successful
The newly included file
scope_record_lock.h
is indeed utilized insrc/pika_client_conn.cc
, as evidenced by the reference topstd::lock::MultiRecordLock
.
src/pika_client_conn.cc
:pstd::lock::MultiRecordLock record_lock(c_ptr->db_->LockMgr());
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the newly included file is utilized in the code. # Test: Search for usage of `scope_record_lock.h`. Expect: At least one usage. rg --type cpp 'scope_record_lock' src/pika_client_conn.ccLength of output: 105
Script:
#!/bin/bash # Description: Identify entities defined in `scope_record_lock.h`. # Locate the file first scope_record_lock_file=$(fd 'scope_record_lock.h') # Extract defined entities (classes, structs, functions, etc.) rg --type cpp --pcre2 '(class|struct|enum|typedef|using|namespace|template)\s+\w+' "$scope_record_lock_file"Length of output: 398
Script:
#!/bin/bash # Description: Identify entities defined in `scope_record_lock.h`. # Locate the file first fd 'scope_record_lock.h' | while read -r scope_record_lock_file; do echo "Entities in $scope_record_lock_file:" rg --type cpp --pcre2 '(class|struct|enum|typedef|using|namespace|template)\s+\w+' "$scope_record_lock_file" doneLength of output: 986
Script:
#!/bin/bash # Description: Verify the utilization of entities from `scope_record_lock.h` in `src/pika_client_conn.cc`. # Search for references to `ScopeRecordLock`, `MultiScopeRecordLock`, and `MultiRecordLock`. rg --type cpp 'ScopeRecordLock|MultiScopeRecordLock|MultiRecordLock' src/pika_client_conn.ccLength of output: 162
include/pika_command.h (3)
293-293
: Added a new command flagkCmdReadBeforeQueue
to improve read/write process by checking cache before queuing.This addition aligns with the PR's objective to optimize command handling by potentially reducing queue operations for cache hits. Ensure that this new flag is integrated correctly in all relevant command implementations.
540-540
: Added methodisCacheRead()
to check if a command should be read from cache.This method likely serves as a helper to determine whether the new
kCmdReadBeforeQueue
behavior should be applied. It's crucial to ensure that this method is used consistently across the codebase where applicable.
584-584
: Added methodDoReadCommandInCache()
which likely implements the actual cache reading logic.This method is central to the PR's functionality, handling the reading of commands from cache. It's important to review its implementation in the corresponding
.cc
file to ensure it handles all edge cases, especially those concerning thread safety and error handling as highlighted by previous reviews.tests/integration/stream_test.go (1)
127-129
: Proper use of conditional execution inBeforeEach
to ensure safety.src/pika_command.cc (4)
246-246
: Ensure the new flagkCmdReadBeforeQueue
is correctly documented and integrated.The addition of
kCmdReadBeforeQueue
to theGetCmd
seems aligned with the PR's objective to handle cache reads before queuing. Please ensure that the integration of this new flag is well documented in the codebase to maintain clarity for future maintenance.
395-395
: Review the implementation and consistency ofkCmdReadBeforeQueue
across hash commands.The addition of the
kCmdReadBeforeQueue
flag to hash-related commands (HGetCmd
,HGetallCmd
,HExistsCmd
,HMgetCmd
) is consistent with the PR's objectives. It's crucial to ensure that these changes are reflected in the system's behavior as expected, particularly in terms of cache interaction and performance.Also applies to: 399-399, 403-403, 423-423
763-763
: Cross-verify the integration of transaction and ACL related commands with the system.The changes to transaction and ACL related commands are crucial and should be thoroughly tested to ensure they do not introduce any regressions or unintended behaviors, especially in multi-threaded scenarios where race conditions could occur.
Also applies to: 769-769, 773-773, 776-776, 779-779, 782-782
739-739
: Ensure proper testing and documentation for Pub/Sub commands with the new flag adjustments.The modifications to Pub/Sub commands (
PublishCmd
,SubscribeCmd
,UnSubscribeCmd
,PSubscribeCmd
,PUnSubscribeCmd
,PubSubCmd
) with new flags should be accompanied by adequate testing and documentation to ensure that they perform as expected in a production environment.Also applies to: 743-743, 747-747, 751-751, 755-755, 759-759
client = redis.NewClient(PikaOption(SINGLEADDR)) | ||
client.FlushDB(ctx) |
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.
Tip
Codebase Verification
Ensure proper error handling for FlushDB
in stream_test.go
.
tests/integration/stream_test.go
(lines 123-124)
Analysis chain
Ensure proper error handling for FlushDB
.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify proper error handling for `FlushDB` in the test setup.
# Test: Search for error handling patterns in the test setup. Expect: Proper error handling.
rg --type go $'client.FlushDB.*\\.Err\\(\\).*NotTo\\(HaveOccurred\\(\\)\\)'
Length of output: 1156
Script:
#!/bin/bash
# Description: Verify proper error handling for `FlushDB` in stream_test.go at lines 123-124.
# Test: Search for error handling patterns in stream_test.go. Expect: Proper error handling.
rg --type go --context 5 'client.FlushDB' tests/integration/stream_test.go
Length of output: 343
@@ -69,6 +69,7 @@ class PikaClientConn : public net::RedisConn { | |||
|
|||
void ProcessRedisCmds(const std::vector<net::RedisCmdArgsType>& argvs, bool async, std::string* response) override; | |||
|
|||
bool BatchReadCmdInCache(const std::vector<net::RedisCmdArgsType>& argvs); |
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.
Add documentation for BatchReadCmdInCache
.
The newly added method BatchReadCmdInCache
lacks documentation. Consider adding a comment explaining what the method does, its parameters, and its return value. This will enhance readability and maintainability.
src/pika_client_conn.cc
Outdated
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->isCacheRead() ){ | ||
// read in cache | ||
if (BatchReadCmdInCache(argvs)){ | ||
return; | ||
} | ||
} | ||
} |
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.
Optimize command lookup to prevent redundant cache checks.
The current implementation checks for cache read capability and then performs a cache read within a conditional statement that checks for cache mode. This could lead to redundant lookups for the same command when the cache mode is not PIKA_CACHE_NONE
. Consider refactoring to ensure the command is only looked up once.
- if (PIKA_CACHE_NONE != g_pika_conf->cache_mode()){
- if (c_ptr && c_ptr->isCacheRead()){
+ if (PIKA_CACHE_NONE != g_pika_conf->cache_mode() && c_ptr && c_ptr->isCacheRead()){
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
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->isCacheRead() ){ | |
// read in cache | |
if (BatchReadCmdInCache(argvs)){ | |
return; | |
} | |
} | |
} | |
std::shared_ptr<Cmd> c_ptr = g_pika_cmd_table_manager->GetCmd(opt); | |
if (PIKA_CACHE_NONE != g_pika_conf->cache_mode() && c_ptr && c_ptr->isCacheRead()){ | |
// read in cache | |
if (BatchReadCmdInCache(argvs)){ | |
return; | |
} | |
} |
src/pika_client_conn.cc
Outdated
bool PikaClientConn::BatchReadCmdInCache(const std::vector<net::RedisCmdArgsType>& argvs){ | ||
resp_num.store(static_cast<int32_t>(argvs.size())); | ||
bool read_status = true; | ||
|
||
for (const auto& argv : argvs) { | ||
std::shared_ptr<std::string> resp_ptr = std::make_shared<std::string>(); | ||
resp_array.push_back(resp_ptr); | ||
std::shared_ptr<Cmd> c_ptr = g_pika_cmd_table_manager->GetCmd(argv[0]); | ||
if (!c_ptr) { | ||
return false; | ||
} | ||
// Check authed | ||
if (AuthRequired()) { // the user is not authed, need to do auth | ||
if (!(c_ptr->flag() & kCmdFlagsNoAuth)) { | ||
c_ptr->res().SetRes(CmdRes::kErrOther, "NOAUTH Authentication required."); | ||
return false; | ||
} | ||
} | ||
// Initial | ||
c_ptr->Initial(argv, current_db_); | ||
pstd::lock::MultiRecordLock record_lock(c_ptr->db_->LockMgr()); | ||
auto cur_keys = c_ptr->current_key(); | ||
if (!cur_keys.empty()){ | ||
record_lock.Lock(cur_keys); | ||
} | ||
|
||
read_status = c_ptr->DoReadCommandInCache(); | ||
time_stat_->process_done_ts_ = pstd::NowMicros(); | ||
auto cmdstat_map = g_pika_cmd_table_manager->GetCommandStatMap(); | ||
(*cmdstat_map)[argv[0]].cmd_count.fetch_add(1); | ||
(*cmdstat_map)[argv[0]].cmd_time_consuming.fetch_add(time_stat_->total_time()); | ||
*resp_ptr = std::move(c_ptr->res().message()); | ||
resp_num--; | ||
record_lock.Unlock(cur_keys); | ||
} | ||
|
||
if(!read_status){ | ||
return read_status; | ||
}else{ | ||
TryWriteResp(); | ||
return read_status; | ||
} | ||
} |
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.
Improve error handling and thread safety in BatchReadCmdInCache
.
The method BatchReadCmdInCache
processes multiple commands and adjusts resp_num
directly. This could lead to race conditions in a multi-threaded environment. Consider using atomic operations or mutexes to protect this shared state. Additionally, there's no error handling if a command fails to initialize or authenticate, which could leave the system in an inconsistent state.
+ std::lock_guard<std::mutex> lock(resp_mutex); // Protect resp_num with a mutex
for (const auto& argv : argvs) {
std::shared_ptr<std::string> resp_ptr = std::make_shared<std::string>();
resp_array.push_back(resp_ptr);
std::shared_ptr<Cmd> c_ptr = g_pika_cmd_table_manager->GetCmd(argv[0]);
if (!c_ptr) {
- return false;
+ read_status = false;
+ break; // Exit loop on failure but ensure cleanup
}
...
}
+ if (!read_status) {
+ // Perform necessary cleanup or state reset here
+ }
Committable suggestion was skipped due to low confidence.
src/pika_command.cc
Outdated
@@ -282,7 +282,7 @@ void InitCmdTable(CmdTable* cmd_table) { | |||
cmd_table->insert(std::pair<std::string, std::unique_ptr<Cmd>>(kCmdNameAppend, std::move(appendptr))); | |||
////MgetCmd | |||
std::unique_ptr<Cmd> mgetptr = | |||
std::make_unique<MgetCmd>(kCmdNameMget, -2, kCmdFlagsRead | kCmdFlagsKv | kCmdFlagsDoThroughDB | kCmdFlagsUpdateCache | kCmdFlagsReadCache | kCmdFlagsFast); | |||
std::make_unique<MgetCmd>(kCmdNameMget, -2, kCmdFlagsRead | kCmdFlagsKv | kCmdFlagsDoThroughDB | kCmdFlagsUpdateCache | kCmdFlagsReadCache | kCmdReadBeforeQueue | kCmdFlagsFast); |
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.
Tip
Codebase Verification
The executed shell scripts provided some useful insights:
-
Usage of
kCmdReadBeforeQueue
withMgetCmd
:- Found in
src/pika_command.cc
.
- Found in
-
References to
MgetCmd
in the main codebase:- Multiple references found in
src/pika_command.cc
,src/pika_kv.cc
, andsrc/pika_hash.cc
.
- Multiple references found in
-
Test cases related to
MgetCmd
:- No direct matches found in the
./tests/
directory.
- No direct matches found in the
-
Indirect references or related tests:
- No indirect references or related tests found.
Based on these results, it appears that while the kCmdReadBeforeQueue
flag is properly integrated with MgetCmd
in the main codebase, there are no direct or indirect tests for MgetCmd
in the test files. This suggests that the new flag's integration is not being tested, which is crucial for ensuring its functionality and performance impact.
- Action Required: Add test cases for
MgetCmd
with thekCmdReadBeforeQueue
flag to ensure proper testing of this integration.
Analysis chain
Validate the integration and testing of the kCmdReadBeforeQueue
flag for MgetCmd
.
The addition of the kCmdReadBeforeQueue
flag to MgetCmd
should be thoroughly tested, especially since this command can significantly impact performance due to its nature of handling multiple keys.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Ensure that `MgetCmd` with the new `kCmdReadBeforeQueue` flag is properly integrated and tested.
# Test: Search for integration tests involving `MgetCmd`.
rg --type go "MgetCmd" ./tests/integration/
Length of output: 43
Script:
#!/bin/bash
# Description: Ensure that `MgetCmd` with the new `kCmdReadBeforeQueue` flag is properly integrated and tested.
# Step 1: Verify the usage of `kCmdReadBeforeQueue` flag with `MgetCmd`.
echo "Searching for usage of kCmdReadBeforeQueue with MgetCmd..."
rg "kCmdReadBeforeQueue" | rg "MgetCmd"
# Step 2: Check for any test cases related to `MgetCmd` across the codebase.
echo "Searching for test cases related to MgetCmd..."
rg "MgetCmd" ./tests/
# Step 3: Ensure that `MgetCmd` with the new flag is properly integrated.
echo "Checking for references to MgetCmd in the main codebase..."
rg "MgetCmd" ./src/
# Step 4: Validate if there are any indirect references or tests for MgetCmd that might not be captured by the initial search.
echo "Searching for indirect references or related tests..."
rg "MgetCmd" ./tests/ | rg -v "integration"
Length of output: 2192
1685e3e
to
b9e4891
Compare
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (6)
- .github/workflows/pika.yml (1 hunks)
- include/pika_client_conn.h (1 hunks)
- include/pika_command.h (3 hunks)
- src/pika_client_conn.cc (3 hunks)
- src/pika_command.cc (7 hunks)
- tests/integration/stream_test.go (1 hunks)
Files skipped from review as they are similar to previous changes (6)
- .github/workflows/pika.yml
- include/pika_client_conn.h
- include/pika_command.h
- src/pika_client_conn.cc
- src/pika_command.cc
- tests/integration/stream_test.go
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- src/pika_client_conn.cc (3 hunks)
- src/pika_command.cc (7 hunks)
Files skipped from review as they are similar to previous changes (2)
- src/pika_client_conn.cc
- src/pika_command.cc
src/pika_command.cc
Outdated
@@ -282,7 +282,7 @@ void InitCmdTable(CmdTable* cmd_table) { | |||
cmd_table->insert(std::pair<std::string, std::unique_ptr<Cmd>>(kCmdNameAppend, std::move(appendptr))); | |||
////MgetCmd | |||
std::unique_ptr<Cmd> mgetptr = | |||
std::make_unique<MgetCmd>(kCmdNameMget, -2, kCmdFlagsRead | kCmdFlagsKv | kCmdFlagsDoThroughDB | kCmdFlagsUpdateCache | kCmdFlagsReadCache | kCmdFlagsFast); | |||
std::make_unique<MgetCmd>(kCmdNameMget, -2, kCmdFlagsRead | kCmdFlagsKv | kCmdFlagsDoThroughDB | kCmdFlagsUpdateCache | kCmdFlagsReadCache | kCmdReadBeforeQueue | kCmdFlagsFast); |
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中,这样命中也不是,没命中也不算的
凡是需要走DB的命令建议直接放行,要不会有拖慢网络线程,影响性能的风险 |
All commands that need to go to the DB are recommended to be released directly, otherwise there will be no risk of slowing down the network thread and affecting performance. |
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- .github/workflows/pika.yml (1 hunks)
- src/pika_command.cc (7 hunks)
Files skipped from review as they are similar to previous changes (2)
- .github/workflows/pika.yml
- src/pika_command.cc
已沟通,当前需要移除mget等命令的支持 |
Communicated, currently support for mget and other commands needs to be removed |
,fix go test error in MacOS and cache mode judge
ea811d3
to
6b81628
Compare
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (6)
- .github/workflows/pika.yml (1 hunks)
- include/pika_client_conn.h (3 hunks)
- include/pika_command.h (4 hunks)
- src/pika_client_conn.cc (5 hunks)
- src/pika_command.cc (6 hunks)
- tests/integration/stream_test.go (1 hunks)
Files skipped from review as they are similar to previous changes (6)
- .github/workflows/pika.yml
- include/pika_client_conn.h
- include/pika_command.h
- src/pika_client_conn.cc
- src/pika_command.cc
- tests/integration/stream_test.go
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- src/pika_client_conn.cc (5 hunks)
Files skipped from review as they are similar to previous changes (1)
- src/pika_client_conn.cc
…#2629) * (Demo) Do read cmd before task queue. && add workflow_dispatch for manual action * Check authed and write lock ,fix go test error in MacOS and cache mode judge * fix some ut error by commands filter and return logic * rollback some flag,but add kCmdReadBeforeQueuefor get mget hget hget hgetall,hmget * fix mem error in macos * move mget and hmget;add before_queue_time metrics * fix cost to copy cmd_table by remove c_ptr
…#2629) * (Demo) Do read cmd before task queue. && add workflow_dispatch for manual action * Check authed and write lock ,fix go test error in MacOS and cache mode judge * fix some ut error by commands filter and return logic * rollback some flag,but add kCmdReadBeforeQueuefor get mget hget hget hgetall,hmget * fix mem error in macos * move mget and hmget;add before_queue_time metrics * fix cost to copy cmd_table by remove c_ptr
* feat: Improve the RTC process of Read/Write model (#2629) * (Demo) Do read cmd before task queue. && add workflow_dispatch for manual action * Check authed and write lock, fix go test error in MacOS and cache mode judge * fix some ut error by commands filter and return logic * rollback some flag,but add kCmdReadBeforeQueuefor get mget hget hget hgetall,hmget * move mget and hmget;add before_queue_time metrics * fix cost to copy cmd_table by remove c_ptr --------- Co-authored-by: chenbt <[email protected]>
…omFoundation#2837) * feat: Improve the RTC process of Read/Write model (OpenAtomFoundation#2629) * (Demo) Do read cmd before task queue. && add workflow_dispatch for manual action * Check authed and write lock, fix go test error in MacOS and cache mode judge * fix some ut error by commands filter and return logic * rollback some flag,but add kCmdReadBeforeQueuefor get mget hget hget hgetall,hmget * move mget and hmget;add before_queue_time metrics * fix cost to copy cmd_table by remove c_ptr --------- Co-authored-by: chenbt <[email protected]>
about: #2542
改动:在读请求放入队列前,先进行判断是否在cache中读取
Summary by CodeRabbit
New Features
Bug Fixes
Chores