Skip to content

Commit 590afe9

Browse files
Mixficsolwuxianrong
andauthored
Solved the problem of commandstate statistics duplication (#3028)
Co-authored-by: wuxianrong <[email protected]>
1 parent 26d10e6 commit 590afe9

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

.github/workflows/pika.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,7 @@ jobs:
155155

156156
- name: Install Deps
157157
run: |
158-
brew update
159-
brew install --overwrite [email protected] autoconf protobuf llvm wget git
160-
brew install gcc@10 automake cmake make binutils
158+
brew install gcc@10 automake cmake make binutils
161159
162160
- name: Configure CMake
163161
run: |

conf/pika.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
###########################
44

55
# Pika port, the default value is 9221.
6-
# [NOTICE] Port Magic offsets of port+1000 / port+10000 are used by Pika at present.
7-
# Port 9221+10000 is used for Rsync, and port 9221+1000 is used for incr Replication, while the listening port is 9221.
6+
# [NOTICE] Port Magic offsets of port+1000 / port+10001 are used by Pika at present.
7+
# Port 9221+10001 is used for Rsync, and port 9221+1000 is used for incr Replication, while the listening port is 9221.
88
port : 9221
99

1010
db-instance-num : 3
@@ -500,7 +500,7 @@ default-slot-num : 1024
500500
# if auto_tuned is true: Enables dynamic adjustment of rate limit within the range
501501
#`[rate-limiter-bandwidth / 20, rate-limiter-bandwidth]`, according to the recent demand for background I/O.
502502
# rate limiter auto tune https://rocksdb.org/blog/2017/12/18/17-auto-tuned-rate-limiter.html. the default value is true.
503-
#rate-limiter-auto-tuned : true
503+
#rate-limiter-auto-tuned : yes
504504

505505
################################## RocksDB Blob Configure #####################
506506
# rocksdb blob configure

src/pika_client_conn.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,8 @@ bool PikaClientConn::ReadCmdInCache(const net::RedisCmdArgsType& argv, const std
371371
resp_num--;
372372
if (read_status) {
373373
time_stat_->process_done_ts_ = pstd::NowMicros();
374-
(*cmdstat_map)[argv[0]].cmd_count.fetch_add(1);
375-
(*cmdstat_map)[argv[0]].cmd_time_consuming.fetch_add(time_stat_->total_time());
374+
(*cmdstat_map)[opt].cmd_count.fetch_add(1);
375+
(*cmdstat_map)[opt].cmd_time_consuming.fetch_add(time_stat_->total_time());
376376
resp_array.emplace_back(std::make_shared<std::string>(std::move(c_ptr->res().message())));
377377
TryWriteResp();
378378
}

0 commit comments

Comments
 (0)