Phillippko commented on code in PR #5816: URL: https://github.com/apache/ignite-3/pull/5816#discussion_r2102627039
########## modules/configuration/src/main/java/org/apache/ignite/internal/configuration/util/KeysTrackingConfigurationVisitor.java: ########## @@ -183,5 +195,32 @@ private void endVisit(int previousKeyLength) { currentKey.setLength(previousKeyLength); currentPath.remove(currentPath.size() - 1); + legacyNames.remove(legacyNames.size() - 1); + } + + /** Calls consumer for all legacy paths. */ + protected void processLegacyPaths(ArrayList<String> path, BiConsumer<String, String> legacyKeyNewKeyConsumer) { + if (path.size() == currentPath().size() - 1) { + for (String legacyName : legacyNames.get(currentPath().size() - 1)) { + String legacyKey = join(appendKey(path, legacyName)); + String newKey = currentKey(); + + legacyKeyNewKeyConsumer.accept(legacyKey, newKey); + } + + path.remove(path.size() - 1); + + return; + } + + for (String legacyName : legacyNames.get(path.size())) { + path.add(legacyName); + + processLegacyPaths(path, legacyKeyNewKeyConsumer); + } + + path.add(currentPath().get(path.size())); + + processLegacyPaths(path, legacyKeyNewKeyConsumer); Review Comment: Discussed in DMs, refactored to make code more readable -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org