mattisonchao opened a new pull request, #25284:
URL: https://github.com/apache/pulsar/pull/25284

   ## Summary
   - The list tenants, list namespaces, and list clusters REST endpoints 
currently execute `asyncResponse.resume()` on the metadata store thread, which 
can block the metadata thread pool and lead to deadlocks or performance 
degradation
   - Offload the response handling (sorting, filtering, collecting) and 
`asyncResponse.resume()` to the web service executor thread pool using 
`thenAcceptAsync`/`thenApplyAsync`
   - Expose `WebService.webServiceExecutor` via Lombok `@Getter` so admin 
endpoints can access it
   
   ## Changes
   - `TenantsBase.getTenants()`: `thenAccept` → `thenAcceptAsync(..., 
webServiceExecutor)`
   - `ClustersBase.getClusters()`: `thenApply` + `thenAccept` → single 
`thenAcceptAsync(..., webServiceExecutor)`
   - `Namespaces.getTenantNamespaces()`: `thenAccept` → `thenAcceptAsync(..., 
webServiceExecutor)`
   - `WebService`: add `@Getter` on `webServiceExecutor` field
   
   ## Test plan
   - [ ] Existing admin REST endpoint tests pass (no functional change, 
threading only)
   - [ ] Verify list tenants/namespaces/clusters endpoints return correct 
results
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


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