commit 7ec19d2985caae5d11c825f612fc920a3588e8d4 from: Alexander Turenko via: Alexander Turenko date: Tue Oct 15 06:19:24 2024 UTC config: simplify acquiring of instance config No functional changes, just a little refactoring. The `iconfig` value is already passed into the `validate_names` function and we don't need to calculate it once again. NO_DOC=no functionality added or changed NO_CHANGELOG=see NO_DOC NO_TEST=see NO_DOC (cherry picked from commit c9a5b74f9f002d77c57d3bb50e58d5dd41dbb72e) commit - 98a2ec27f281b1487f9b22f76706f8b74cd3e9ae commit + 7ec19d2985caae5d11c825f612fc920a3588e8d4 blob - b1c0901397346aa24867b4fdbe99375d7c5c24b0 blob + 5c76903040741873342043243fbdb7521c1407b6 --- src/box/lua/config/configdata.lua +++ src/box/lua/config/configdata.lua @@ -486,7 +486,6 @@ local function validate_names(saved_names, config_name -- Fail early, if current UUID is not set, but no name is found -- inside the snapshot file. Ignore this failure, if replica is -- configured as anonymous, anon replicas cannot have names. - local iconfig = config_names.peers[config_names.instance_name].iconfig_def if not instance_config:get(iconfig, 'replication.anon') then if saved_names.instance_name == nil and config_names.instance_uuid == nil then @@ -868,7 +867,6 @@ local function new(iconfig, cconfig, instance_name) -- UUIDs from config, generated one should not be used here. replicaset_uuid = replicaset_uuid, instance_uuid = instance_uuid, - peers = peers, }, iconfig_def) end