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(
164164 shards_section_started = False
165165
166166 # 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
168168
169169 logging .debug (f"All nodes: { all_nodes } " )
170170 logging .debug (f"Nodes with shards from any database: { nodes_with_any_shards } " )
171171 logging .debug (f"Nodes with target database shards: { nodes_with_target_db_shards } " )
172172 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 } " )
174174
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 " )
177177
178178 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" )
180180
181181 # 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
183183 target_node = next (iter (master_nodes )).split (":" )[1 ] # node:2 -> 2
184184
185185 return target_node , empty_node
You can’t perform that action at this time.
0 commit comments