mirror of https://github.com/ledisdb/ledisdb.git
add compression for log
This commit is contained in:
parent
05135a5ac9
commit
b2a8b70e54
|
@ -34,6 +34,7 @@ type ReplicationConfig struct {
|
|||
ExpiredLogDays int `toml:"expired_log_days"`
|
||||
Sync bool `toml:"sync"`
|
||||
WaitSyncTime int `toml:"wait_sync_time"`
|
||||
Compression bool `toml:"compression"`
|
||||
}
|
||||
|
||||
type Config struct {
|
||||
|
@ -98,6 +99,7 @@ func NewConfigDefault() *Config {
|
|||
cfg.LMDB.NoSync = true
|
||||
|
||||
cfg.Replication.WaitSyncTime = 1
|
||||
cfg.Replication.Compression = true
|
||||
|
||||
return cfg
|
||||
}
|
||||
|
|
|
@ -54,9 +54,11 @@ path = ""
|
|||
expired_log_days = 7
|
||||
|
||||
# If sync is true, the new log must be sent to some slaves, and then commit.
|
||||
# It may affect performance.
|
||||
# It will reduce performance but have better high availability.
|
||||
sync = true
|
||||
|
||||
# If sync is true, wait at last wait_sync_time seconds to check whether slave sync this log
|
||||
# If sync is true, wait at last wait_sync_time seconds for slave syncing this log
|
||||
wait_sync_time = 1
|
||||
|
||||
# Compress the log or not
|
||||
compression = true
|
||||
|
|
Loading…
Reference in New Issue