morningman opened a new pull request, #62031:
URL: https://github.com/apache/doris/pull/62031

   ### What problem does this PR solve?
   
   Issue Number: N/A
   
   Problem Summary:
   Add a ClusterGuard SPI (Service Provider Interface) abstraction in fe-core to
   decouple cluster-level policy enforcement (e.g., node limits, time validity 
checks)
   from business logic. The open-source fe-core depends only on the interface, 
while
   commercial implementations can be plugged in at runtime via Java 
ServiceLoader
   without any compile-time dependency on fe-core.
   
   Key changes:
   - Add `ClusterGuard` interface with `onStartup`, `checkTimeValidity`, 
`checkNodeLimit` and `getGuardInfo` methods
   - Add `ClusterGuardFactory` using Java ServiceLoader to discover 
implementations at runtime
   - Add `NoOpClusterGuard` as the open-source no-op default implementation
   - Add `ClusterGuardException` for guard-related error reporting
   - Add `ClusterGuardAction` HTTP API at `/api/cluster_guard/` for status query
   - Integrate `ClusterGuardFactory.getGuard()` into `DorisFE.java` (startup) 
and `SystemInfoService.java` (addBackend/dropBackend)
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test: No need to test (internal SPI wiring, no behavior change in 
open-source build)
   - Behavior changed: No
   - Does this need documentation: No
   
   Co-authored-by: Copilot <[email protected]>


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to