len548 opened a new pull request, #12041: URL: https://github.com/apache/ozone/pull/12041
## What changes were proposed in this pull request? This PR simplifies `XceiverClientManager` cache-key handling by separating short-circuit reads from the normal cached client path. Normal gRPC, Ratis, and EC clients continue to use clientCache. Short-circuit reads are now handled through a dedicated shortCircuitClient field guarded by the same cache monitor, rather than by encoding short-circuit state into the general cache key and storing the local datanode in localDNCache. ### Main changes: - Removed localDNCache. - Added explicit short-circuit client lookup/reuse logic. - Added XceiverClientShortCircuit.isOpen() to determine whether the short-circuit client can be reused. - Simplified getPipelineCacheKey() so it only describes cached client identity. - Preserved target-datanode suffixes for EC and topology-aware streaming clients. - Changed read-data release to rebuild keys consistently with read-data acquire. - Fixed tests that manually constructed cache keys without the - separator. ### Why The previous implementation made getPipelineCacheKey() do too much. It built the cache key, searched for a local datanode, updated localDNCache, and encoded short-circuit state into the key. That made the cache behavior difficult to reason about and left a side map whose entries were not removed when clientCache evicted clients. By keeping short-circuit reads outside the normal client cache, the cache key now represents only the identity of cached gRPC/Ratis/EC clients. This reduces hidden coupling and makes invalidation and cleanup clearer. Co-authored by: Cursor ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-17799 ## How was this patch tested? CI passed. -- 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]
