shuwenwei commented on code in PR #18648:
URL: https://github.com/apache/iotdb/pull/18648#discussion_r4032728174


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/auth/AuthorityChecker.java:
##########
@@ -131,13 +131,15 @@ public static IAuthorityFetcher getAuthorityFetcher() {
   }
 
   public static boolean invalidateCache(String username, String roleName) {
+    final boolean invalidated =
+        authorityFetcher.get().getAuthorCache().invalidateCache(username, 
roleName);

Review Comment:
   Thanks for the detailed analysis. We understand the concern about 
authority-cache refill after invalidation.
   
   This refill race is pre-existing and orthogonal to this PR: the 
unconditional putUserCache() path in ClusterAuthorityFetcher / 
BasicAuthorityCache is unchanged, and this PR is scoped to table-level matcher 
caching and its invalidation behavior. We do not plan to expand this PR into an 
authority-cache generation/epoch redesign.
   
   If the maintainers consider it necessary, a separate PR can be opened later 
to handle authority-cache refill coordination and add the latch-based 
interleaving test there. For this PR, we would prefer to keep the 
matcher-related invalidation ordering fix and focused matcher tests.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to