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"`
|
ExpiredLogDays int `toml:"expired_log_days"`
|
||||||
Sync bool `toml:"sync"`
|
Sync bool `toml:"sync"`
|
||||||
WaitSyncTime int `toml:"wait_sync_time"`
|
WaitSyncTime int `toml:"wait_sync_time"`
|
||||||
|
Compression bool `toml:"compression"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
|
@ -98,6 +99,7 @@ func NewConfigDefault() *Config {
|
||||||
cfg.LMDB.NoSync = true
|
cfg.LMDB.NoSync = true
|
||||||
|
|
||||||
cfg.Replication.WaitSyncTime = 1
|
cfg.Replication.WaitSyncTime = 1
|
||||||
|
cfg.Replication.Compression = true
|
||||||
|
|
||||||
return cfg
|
return cfg
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,9 +54,11 @@ path = ""
|
||||||
expired_log_days = 7
|
expired_log_days = 7
|
||||||
|
|
||||||
# If sync is true, the new log must be sent to some slaves, and then commit.
|
# 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
|
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
|
wait_sync_time = 1
|
||||||
|
|
||||||
|
# Compress the log or not
|
||||||
|
compression = true
|
||||||
|
|
Loading…
Reference in New Issue