mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
default redis reads options
details in https://github.com/chrislusf/seaweedfs/pull/1165
This commit is contained in:
parent
fcbd04c425
commit
a9b1ee18af
|
@ -136,8 +136,10 @@ addresses = [
|
|||
"localhost:30006",
|
||||
]
|
||||
password = ""
|
||||
readOnly = false
|
||||
routeByLatency = false
|
||||
// allows reads from slave servers or the master, but all writes still go to the master
|
||||
readOnly = true
|
||||
// automatically use the closest Redis server for reads
|
||||
routeByLatency = true
|
||||
|
||||
[etcd]
|
||||
enabled = false
|
||||
|
|
|
@ -20,6 +20,9 @@ func (store *RedisClusterStore) GetName() string {
|
|||
|
||||
func (store *RedisClusterStore) Initialize(configuration util.Configuration) (err error) {
|
||||
|
||||
configuration.SetDefault("useReadOnly", true)
|
||||
configuration.SetDefault("routeByLatency", true)
|
||||
|
||||
return store.initialize(
|
||||
configuration.GetStringSlice("addresses"),
|
||||
configuration.GetString("password"),
|
||||
|
|
Loading…
Reference in a new issue