This is an automated email from the ASF dual-hosted git repository.
yongzao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 32f287a400a Fix compatibility issues when loading snapshot in pipe.
(#16580)
32f287a400a is described below
commit 32f287a400aee14b8d457b4d3077d634e6a7a93f
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);