Skip to content

Commit 89c4688

Browse files
sourcecdSergey J
andauthored
add special case for customize nodes for tablet ids (#9466)
Co-authored-by: Sergey J <wint@yandex-team.ru>
1 parent 5112d42 commit 89c4688

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

ydb/tools/cfg/static.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,16 @@ def __add_tablet(self, tablet_type, index, node_ids, number_of_channels=3):
637637
tablet.AllowDynamicConfiguration = True
638638

639639
if explicit_node_ids:
640-
node_ids = explicit_node_ids
640+
node_ids = []
641+
for item in explicit_node_ids:
642+
if type(item) is list:
643+
try:
644+
node_ids.append(item[index])
645+
except IndexError:
646+
logger.error("nodes count for tablet type %s wrong, nodeid for tablet index: %d not found" % (tablet_name, index))
647+
exit(1)
648+
else:
649+
node_ids.append(item)
641650
tablet.Node.extend(node_ids)
642651

643652
for channel_id in range(int(number_of_channels)):

0 commit comments

Comments
 (0)