This is an automated email from the ASF dual-hosted git repository. justinchen pushed a commit to branch fix-login in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit da5134db875f8cd9083ccb1ca46ce5fab35f16f4 Author: Caideyipi <[email protected]> AuthorDate: Sat Mar 21 23:07:31 2026 +0800 added-logger --- .../src/main/java/org/apache/iotdb/db/auth/BasicAuthorityCache.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/auth/BasicAuthorityCache.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/auth/BasicAuthorityCache.java index b90469b6f70..ac1d4783613 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/auth/BasicAuthorityCache.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/auth/BasicAuthorityCache.java @@ -64,11 +64,13 @@ public class BasicAuthorityCache implements IAuthorCache { AuthorityChecker.setSuperUser(user.getName()); } userCache.put(userName, user); + LOGGER.info("Put user cache, user: {}", user); } @Override public void putRoleCache(String roleName, Role role) { roleCache.put(roleName, role); + LOGGER.info("Put role cache, role: {}", role); } /** @@ -85,8 +87,10 @@ public class BasicAuthorityCache implements IAuthorCache { Set<String> roleSet = userCache.getIfPresent(userName).getRoleSet(); if (!roleSet.isEmpty()) { roleCache.invalidateAll(roleSet); + LOGGER.info("Invalidated cache for roles {}", roleSet); } userCache.invalidate(userName); + LOGGER.info("Invalidated cache for user {}", userName); } if (userCache.getIfPresent(userName) != null) { LOGGER.error("datanode cache initialization failed"); @@ -96,6 +100,7 @@ public class BasicAuthorityCache implements IAuthorCache { if (roleName != null) { if (roleCache.getIfPresent(roleName) != null) { roleCache.invalidate(roleName); + LOGGER.info("Invalidated cache for role {}", roleName); } if (roleCache.getIfPresent(roleName) != null) { LOGGER.error("datanode cache initialization failed"); @@ -109,5 +114,6 @@ public class BasicAuthorityCache implements IAuthorCache { public void invalidAllCache() { userCache.invalidateAll(); roleCache.invalidateAll(); + LOGGER.info("Invalidated all users and roles cache."); } }
