Description
The implementation of removeBlocks and getHostLocalDirs in ExternalBlockStoreClient closes the client after processing a response in the callback.
This is a cached client which will be re-used for other responses. There could be other outstanding request to the shuffle service, so it should not be closed after processing a response.
Seems like this is a bug introduced with SPARK-27651 and SPARK-27677.
The older methods registerWithShuffleServer and fetchBlocks didn't close the client.