wForget opened a new pull request, #2827: URL: https://github.com/apache/uniffle/pull/2827
### What changes were proposed in this pull request? Replace the unbounded `readShuffleHandleCache` map with a Guava `Cache` with a configurable maximum size. Evicted handles are fetched again when needed. Preserve cache invalidation during `unregisterShuffle` and error handling for failed or missing handle loads. ### Why are the changes needed? Cached handles are currently removed when `unregisterShuffle` is called, but the timing depends on Spark's shuffle lifecycle management and is not deterministic. Long-running applications that create many shuffles may therefore accumulate cached handles, increasing executor memory usage. This change adds a limit on the cache size. Fix: #2826 ### Does this PR introduce _any_ user-facing change? Yes. Add `spark.rss.client.read.shuffleHandleCacheMaxSize`, defaulting to `10`. The value must be non-negative; `0` disables cache retention. ### How was this patch tested? Added unit test -- 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]
