You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "mridulm (via GitHub)" <gi...@apache.org> on 2023/10/01 01:05:40 UTC

[GitHub] [spark] mridulm commented on pull request #43004: [SPARK-45134][SHUFFLE] Avoid repeated fallback when failed to fetch remote push-merged block meta

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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org