wForget opened a new issue, #2826:
URL: https://github.com/apache/uniffle/issues/2826

   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   
   
   ### Search before asking
   
   - [x] I have searched in the 
[issues](https://github.com/apache/incubator-uniffle/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### What would you like to be improved?
   
   `readShuffleHandleCache` currently uses an unbounded concurrent map. Cached 
handles are removed when `unregisterShuffle` is called, but the timing of this 
cleanup depends on Spark's shuffle lifecycle management and is not 
deterministic.
   
   As a result, long-running Spark applications that create many shuffles may 
retain cached handles for an extended period, increasing executor memory usage. 
Therefore, I would like to add a limit on the cache size.
   
   ### How should we improve?
   
   Replace the unbounded map with a Guava `Cache` configured with `maximumSize`.
   
   Introduce `spark.rss.client.read.shuffleHandleCacheMaxSize`, defaulting to 
`10`. A value of `0` disables cache retention. Evicted handles are fetched 
again when needed.
   
   Continue invalidating cached handles during `unregisterShuffle`, and 
preserve existing error behavior for failed or missing handle loads. Add tests 
covering eviction, zero capacity, and retries after failed loads.
   
   ### Are you willing to submit PR?
   
   - [x] Yes I am willing to submit a PR!


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