This is an automated email from the ASF dual-hosted git repository. jackietien pushed a commit to branch rc/2.0.6 in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 8d367a28648de0a95a9b1ae32f33b89998172e94 Author: wenyanshi-123 <[email protected]> AuthorDate: Tue Oct 14 15:59:31 2025 +0800 Fix compatibility issues when loading snapshot in pipe. (#16580) --- .../pipe/source/ConfigRegionListeningQueue.java | 24 ++++++++++++++-------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/pipe/source/ConfigRegionListeningQueue.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/pipe/source/ConfigRegionListeningQueue.java index b70a039da44..988ead4b8ad 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/pipe/source/ConfigRegionListeningQueue.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/pipe/source/ConfigRegionListeningQueue.java @@ -157,15 +157,21 @@ public class ConfigRegionListeningQueue extends AbstractPipeListeningQueue : null, snapshotPathInfo.getRight()); if (type == CNSnapshotFileType.USER_ROLE) { - long userId = Long.parseLong(snapshotPath.toFile().getName().split("_")[0]); - try { - curEvent.setAuthUserName( - ConfigNode.getInstance() - .getConfigManager() - .getPermissionManager() - .getUserName(userId)); - } catch (AuthException e) { - LOGGER.warn("Failed to collect user name for user id {}", userId, e); + String userName = snapshotPath.toFile().getName().split("_")[0]; + long userId; + if (userName.matches("\\d+")) { + userId = Long.parseLong(userName); + try { + curEvent.setAuthUserName( + ConfigNode.getInstance() + .getConfigManager() + .getPermissionManager() + .getUserName(userId)); + } catch (AuthException e) { + LOGGER.warn("Failed to collect user name for user id {}", userId, e); + } + } else { + curEvent.setAuthUserName(userName); } } events.add(curEvent);
