alpass163gmail opened a new pull request, #18425:
URL: https://github.com/apache/iotdb/pull/18425

   Description
   
     What
   
     Makes authority operations (GRANT, REVOKE, CREATE/DROP USER/ROLE, ALTER
     USER, etc.) highly available by integrating their cache invalidation into
     the existing ClusterCachePropagator infrastructure that was already used by
      DDL operations.
   
     Why
   
     Previously, the AuthOperationProcedure used a bespoke retry loop with
     SyncDataNodeClientPool to invalidate permission caches on DataNodes
     one-at-a-time. This had several issues:
   
     - Blocking sequential invalidation: each DataNode was contacted
     synchronously in series, making the procedure slow and fragile when a node
     is unreachable.
     - No fencing awareness: the old code had no integration with
     MetadataLeaseManager self-fencing. It would retry indefinitely against
     nodes that would never respond.
     - Inconsistent with the rest of the codebase: every other
     metadata-broadcast procedure (CREATE TABLE, DROP TABLE, etc.) already used
     ClusterCachePropagator with the PROCEED/WAIT/FAIL verdict model. Authority
     was the odd one out.
   
     How
   
     AuthOperationProcedure — replaced the iterative dataNodesToInvalid list +
     SyncDataNodeClientPool retry loop with a single call to
     ClusterCachePropagator.propagate(), which broadcasts to all DataNodes in
     parallel. The propagator safely skips any DataNode that has been silent for
      longer than the fence timeout, relying on the self-fencing guarantee to
     prevent stale reads.
   
     ClusterAuthorityFetcher — replaced the checkCacheAvailable() guard (which
     tracked a cacheOutDate flag and heartBeatTimeStamp) with
     failIfMetadataLeaseFenced() at every metadata-access entry point. This is
     the same lease-protection pattern used by the schema, table, and pipe
     subsystems. Unused methods (refreshToken, invalidateAllCache) and their
     i18n messages were removed.
   
     BasicAuthorityCache — removed post-invalidation validator checks
     (getIfPresent after invalidate) that could produce false negatives and
     block cache operations on a completely healthy node.
   
     Scope
   
     - iotdb-core/confignode: AuthOperationProcedure, async request type +
     manager registration
     - iotdb-core/datanode: ClusterAuthorityFetcher, BasicAuthorityCache,
     IAuthorityFetcher
     - integration-test: new IoTDBTableAuthHAIT covering user/role/permission
     management under both DataNode-down and DataNode-ReadOnly failure modes


-- 
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