Skip to content

Commit

Permalink
1) modify log_level to loglevel; 2) use INFO and ERROR to stands for …
Browse files Browse the repository at this point in the history
…the log_level, rather than numeric; 3)modify maxconnection to maxclients; 4)modify '_' to '-' in config iterms; 5) modify 'single' to 'master' in info
  • Loading branch information
wuxiaofei-xy committed Jun 23, 2016
1 parent a6bcf0a commit 7765cb8
Show file tree
Hide file tree
Showing 6 changed files with 213 additions and 167 deletions.
58 changes: 29 additions & 29 deletions conf/pika.conf
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Pika port
port : 9221
# Thread Number
thread_num : 1
thread-num : 1
# Sync Thread Number
sync_thread_num : 6
sync-thread-num : 6
# Item count of sync thread queue
sync_buffer_size : 10
sync-buffer-size : 10
# Pika log path
log_path : ./log/
# Pika glog level
log_level : 0
log-path : ./log/
# Pika glog level: only INFO and ERROR
loglevel : 0
# Pika db path
db_path : ./db/
# Pika write_buffer_size
write_buffer_size : 268435456
db-path : ./db/
# Pika write-buffer-size
write-buffer-size : 268435456
# Pika timeout
timeout : 60
# Requirepass
Expand All @@ -23,40 +23,40 @@ userpass :
# User Blacklist
userblacklist :
# Dump Prefix
dump_prefix :
dump-prefix :
# daemonize [yes | no]
#daemonize : yes
# Dump Path
dump_path : ./dump/
dump-path : ./dump/
# pidfile Path
pidfile : ./pika.pid
# Max Connection
maxconnection : 20000
maxclients : 20000
# the per file size of sst to compact, defalut is 2M
target_file_size_base : 20971520
# Expire_logs_days
expire_logs_days : 7
# Expire_logs_nums
expire_logs_nums : 10
# Root_connection_num
root_connection_num : 2
# Slowlog_log_slower_than
slowlog_log_slower_than : 10000
target-file-size-base : 20971520
# Expire-logs-days
expire-logs-days : 7
# Expire-logs-nums
expire-logs-nums : 10
# Root-connection-num
root-connection-num : 2
# Slowlog-log-slower-than
slowlog-log-slower-than : 10000
# slave-read-only(yes/no, 1/0)
slave_read_only : 0
slave-read-only : 0
# Pika db sync path
db_sync_path : ./dbsync/
db-sync-path : ./dbsync/
# db sync speed(MB) max is set to 125MB, min is set to 0, and if below 0 or above 125, the value will be adjust to 125
db_sync_speed : -1
db-sync-speed : -1

###################
## Critical Settings
###################
# binlog file size: default is 100M, limited in [1K, 2G]
binlog_file_size : 104857600
binlog-file-size : 104857600
# Compression
compression : snappy
# max_background_flushes: default is 1, limited in [1, 4]
max_background_flushes : 1
# max_background_compactions: default is 1, limited in [1, 4]
max_background_compactions : 1
# max-background-flushes: default is 1, limited in [1, 4]
max-background-flushes : 1
# max-background-compactions: default is 1, limited in [1, 4]
max-background-compactions : 1
6 changes: 3 additions & 3 deletions include/pika_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class PikaConf : public slash::BaseConf {
int expire_logs_days() { RWLock l(&rwlock_, false); return expire_logs_days_; }
std::string conf_path() { RWLock l(&rwlock_, false); return conf_path_; }
bool readonly() { RWLock l(&rwlock_, false); return readonly_; }
int maxconnection() { RWLock l(&rwlock_, false); return maxconnection_; }
int maxclients() { RWLock l(&rwlock_, false); return maxclients_; }
int root_connection_num() { RWLock l(&rwlock_, false); return root_connection_num_; }
int slowlog_slower_than() { RWLock l(&rwlock_, false); return slowlog_log_slower_than_; }

Expand Down Expand Up @@ -100,7 +100,7 @@ class PikaConf : public slash::BaseConf {
}
void SetMaxConnection(const int value) {
RWLock l(&rwlock_, true);
maxconnection_ = value;
maxclients_ = value;
}
void SetRootConnectionNum(const int value) {
RWLock l(&rwlock_, true);
Expand Down Expand Up @@ -140,7 +140,7 @@ class PikaConf : public slash::BaseConf {

//char pidfile_[PIKA_WORD_SIZE];
std::string compression_;
int maxconnection_;
int maxclients_;
int root_connection_num_;
int slowlog_log_slower_than_;
int expire_logs_days_;
Expand Down
2 changes: 1 addition & 1 deletion pikatests/tests/assets/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dump_path : ./dump/
# pidfile Path
pidfile : ./pika.pid
# Max Connection
maxconnection : 20000
maxclients : 20000
# the per file size of sst to compact, defalut is 2M
target_file_size_base : 20971520
# Expire_logs_days
Expand Down
Loading

0 comments on commit 7765cb8

Please sign in to comment.