File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -164,22 +164,22 @@ def find_target_node_and_empty_node(
164
164
shards_section_started = False
165
165
166
166
# Find empty node (node with no shards from ANY database)
167
- empty_nodes = all_nodes - nodes_with_any_shards
167
+ nodes_with_no_shards_target_bdb = all_nodes - nodes_with_target_db_shards
168
168
169
169
logging .debug (f"All nodes: { all_nodes } " )
170
170
logging .debug (f"Nodes with shards from any database: { nodes_with_any_shards } " )
171
171
logging .debug (f"Nodes with target database shards: { nodes_with_target_db_shards } " )
172
172
logging .debug (f"Master nodes (target database only): { master_nodes } " )
173
- logging .debug (f"Empty nodes : { empty_nodes } " )
173
+ logging .debug (f"Nodes with no shards from target database : { nodes_with_no_shards_target_bdb } " )
174
174
175
- if not empty_nodes :
176
- raise ValueError ("No empty nodes (nodes without shards) found " )
175
+ if not nodes_with_no_shards_target_bdb :
176
+ raise ValueError ("All nodes have shards from target database " )
177
177
178
178
if not master_nodes :
179
- raise ValueError ("No nodes with master shards found" )
179
+ raise ValueError ("No nodes with master shards from target database found" )
180
180
181
181
# Return the first available empty node and master node (numeric part only)
182
- empty_node = next (iter (empty_nodes )).split (":" )[1 ] # node:1 -> 1
182
+ empty_node = next (iter (nodes_with_no_shards_target_bdb )).split (":" )[1 ] # node:1 -> 1
183
183
target_node = next (iter (master_nodes )).split (":" )[1 ] # node:2 -> 2
184
184
185
185
return target_node , empty_node
You can’t perform that action at this time.
0 commit comments