mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
Randomize correctly
This commit is contained in:
parent
459fa898ed
commit
57db5cf24c
@ -2847,8 +2847,14 @@ class ClickHouseCluster:
|
|||||||
indentation = 4 * " "
|
indentation = 4 * " "
|
||||||
|
|
||||||
def get_feature_flag_value(feature_flag):
|
def get_feature_flag_value(feature_flag):
|
||||||
|
if not self.keeper_randomize_feature_flags:
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
if feature_flag in self.keeper_required_feature_flags:
|
||||||
|
return 1
|
||||||
|
|
||||||
|
return random.randint(0, 1)
|
||||||
|
|
||||||
with open(feature_flags_config, "w") as ff_config:
|
with open(feature_flags_config, "w") as ff_config:
|
||||||
ff_config.write("keeper_server:\n")
|
ff_config.write("keeper_server:\n")
|
||||||
ff_config.write(f"{indentation}feature_flags:\n")
|
ff_config.write(f"{indentation}feature_flags:\n")
|
||||||
|
Loading…
Reference in New Issue
Block a user