Skip to content

Commit 05d93ce

Browse files
author
wuxianrong
committed
add conf
1 parent c41b292 commit 05d93ce

2 files changed

Lines changed: 5 additions & 10 deletions

File tree

conf/pika.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ admin-thread-pool-size : 2
4545
slow-cmd-list :
4646

4747
# List of commands considered as administrative. These commands will be handled by the admin thread pool. Modify this list as needed.
48-
# Default commands: info, ping, monitor
48+
# Default commands: info, ping, monitor, auth
4949
# This parameter is only supported by the CONFIG GET command and not by CONFIG SET.
50-
admin-cmd-list : info, ping, monitor
50+
admin-cmd-list : info, ping, monitor, auth
5151

5252
# The number of threads to write DB in slaveNode when replicating.
5353
# It's preferable to set slave's sync-thread-num value close to master's thread-pool-size.

src/pika_cmd_table_manager.cc

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,9 @@
1515
extern std::unique_ptr<PikaConf> g_pika_conf;
1616

1717
void PikaCmdTableManager::ResetCommandCount() {
18-
while (true) {
19-
std::this_thread::sleep_for(std::chrono::minutes(1));
20-
{
21-
std::lock_guard<std::mutex> lock(command_mutex_);
22-
slow_command_count_.clear();
23-
InitHistograms();
24-
}
25-
}
18+
std::lock_guard<std::mutex> lock(command_mutex_);
19+
slow_command_count_.clear();
20+
InitHistograms();
2621
}
2722

2823
void PikaCmdTableManager::InitHistograms() {

0 commit comments

Comments
 (0)