unified-storage: expose ring replication factor config (#106345)
* config ring replication factor * change default * rename * fix test * fix
This commit is contained in:
+1
-1
@@ -91,7 +91,7 @@ func toRingConfig(cfg *setting.Cfg, KVStore kv.Config) ring.Config {
|
||||
rc.KVStore = KVStore
|
||||
rc.HeartbeatTimeout = resource.RingHeartbeatTimeout
|
||||
|
||||
rc.ReplicationFactor = 1
|
||||
rc.ReplicationFactor = cfg.SearchRingReplicationFactor
|
||||
|
||||
return rc
|
||||
}
|
||||
|
||||
@@ -274,6 +274,7 @@ func initDistributorServerForTest(t *testing.T, memberlistPort int) testModuleSe
|
||||
cfg.MemberlistJoinMember = "127.0.0.1:" + strconv.Itoa(memberlistPort)
|
||||
cfg.MemberlistAdvertiseAddr = "127.0.0.1"
|
||||
cfg.MemberlistAdvertisePort = memberlistPort
|
||||
cfg.SearchRingReplicationFactor = 1
|
||||
cfg.Target = []string{modules.SearchServerDistributor}
|
||||
cfg.InstanceID = "distributor" // does nothing for the distributor but may be useful to debug tests
|
||||
|
||||
@@ -308,6 +309,7 @@ func createStorageServerApi(t *testing.T, instanceId int, dbType, dbConnStr stri
|
||||
cfg.MemberlistJoinMember = "127.0.0.1:" + strconv.Itoa(memberlistPort)
|
||||
cfg.MemberlistAdvertiseAddr = "127.0.0.1"
|
||||
cfg.MemberlistAdvertisePort = getRandomPort()
|
||||
cfg.SearchRingReplicationFactor = 1
|
||||
cfg.InstanceID = "instance-" + strconv.Itoa(instanceId)
|
||||
cfg.IndexPath = t.TempDir() + cfg.InstanceID
|
||||
cfg.IndexFileThreshold = testIndexFileThreshold
|
||||
|
||||
Reference in New Issue
Block a user