mridulm commented on PR #43004:
URL: https://github.com/apache/spark/pull/43004#issuecomment-1741906030
Wouldn't this not be the case for all uses of
`RpcChannelListener.handleFailure` ? Not just for meta ?
If yes, the fix would be to handle this for `outstandingRpcs` in
`TransportResponseHandler`.
Namely:
A) fix get/remove pattern:
Essentially, replace the pattern:
```
<ListenerrType> listener = (<ListenerrType>)
outstandingRpcs.get(resp.requestId);
if (listener == null) {
// handle missing listener
} else {
outstandingRpcs.remove(resp.requestId);
// process
```
with:
```
<ListenerrType> listener = (<ListenerrType>)
outstandingRpcs.remove(resp.requestId);
if (listener == null) {
// handle missing listener
} else {
// process
```
and
B) `removeRpcRequest` return's `boolean` indicating whether the request was
removed.
C) Optionally, modify `failOutstandingRequests` to create a copy of
`outstandingRpcs.values` and clear it immediately.
There is an inherent race here, but it no different from what currently
exists anyway.
Thoughts ?
+CC @Ngone51, @otterc
--
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]