From db303ca01496aea4fd62ae8715e20483b79b2e5c Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Sat, 25 Jul 2026 04:55:14 +0200 Subject: [PATCH] Allocate a fresh node index when merging a backup A node imported by a merge was assigned a free index and then had it overwritten by the index carried in the backup, which may already belong to a node in the target database. Keep the allocated index instead; a full restore still honors the dumped index. --- confluent_server/confluent/config/configmanager.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/confluent_server/confluent/config/configmanager.py b/confluent_server/confluent/config/configmanager.py index fa3f51e5..58d3ba88 100644 --- a/confluent_server/confluent/config/configmanager.py +++ b/confluent_server/confluent/config/configmanager.py @@ -2624,6 +2624,11 @@ class ConfigManager(object): nidx = 1 set_global('max_node_index', nidx + 1) self._cfgstore['nodes'][node] = {'id.index': {'value': nidx}} + if merge == "skip": + # the index just allocated is known to be free, while an + # index carried in from a merged backup may already be + # assigned to a node in this database + attribmap[node].pop('id.index', None) cfgobj = self._cfgstore['nodes'][node] recalcexpressions = False for attrname in attribmap[node]: