mirror of
https://github.com/xcat2/confluent.git
synced 2026-08-03 16:07:00 +00:00
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.
This commit is contained in:
@@ -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]:
|
||||
|
||||
Reference in New Issue
Block a user