Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-19450] Replace askWithRetry with askSync. #16790

Closed
wants to merge 1 commit into from

Conversation

jinxing64
Copy link

What changes were proposed in this pull request?

askSync is already added in RpcEndpointRef (see SPARK-19347 and #16690 (comment)) and askWithRetry is marked as deprecated.
As mentioned SPARK-18113(#16503 (comment)):

askWithRetry is basically an unneeded API, and a leftover from the akka days that doesn't make sense anymore. It's prone to cause deadlocks (exactly because it's blocking), it imposes restrictions on the caller (e.g. idempotency) and other things that people generally don't pay that much attention to when using it.

Since askWithRetry is just used inside spark and not in user logic. It might make sense to replace all of them with askSync.

How was this patch tested?

This PR doesn't change code logic, existing unit test can cover.

@jinxing64
Copy link
Author

#16690 (comment) causes the build to produce lots of deprecation warnings.
@srowen @vanzin How do you think about this ?

@srowen
Copy link
Member

srowen commented Feb 17, 2017

If it was just an internal API that's not supposed to be used not, and askSync is supposed to be the right thing to call in all instances, then, yes this is the right thing to do. However I wonder if we're missing something because this wasn't done initially.

@jinxing64
Copy link
Author

jinxing64 commented Feb 17, 2017

@srowen Both askSync and askWithRetry are blocking, the only difference is the "retry"(default is 3 times) when the rpc is failed. Callers of this method do not necessarily rely on this "retry".

@vanzin
Copy link
Contributor

vanzin commented Feb 17, 2017

ok to test

@vanzin
Copy link
Contributor

vanzin commented Feb 17, 2017

The change LGTM pending tests.

@SparkQA
Copy link

SparkQA commented Feb 17, 2017

Test build #73069 has finished for PR 16790 at commit b575c55.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@vanzin
Copy link
Contributor

vanzin commented Feb 18, 2017

retest this please

@SparkQA
Copy link

SparkQA commented Feb 18, 2017

Test build #73084 has finished for PR 16790 at commit b575c55.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@srowen
Copy link
Member

srowen commented Feb 19, 2017

Merged to master

@asfgit asfgit closed this in ba8912e Feb 19, 2017
@jinxing64
Copy link
Author

@srowen @vanzin
Thanks a lot for the work on this ~

Yunni pushed a commit to Yunni/spark that referenced this pull request Feb 27, 2017
## What changes were proposed in this pull request?

`askSync` is already added in `RpcEndpointRef` (see SPARK-19347 and apache#16690 (comment)) and `askWithRetry` is marked as deprecated.
As mentioned SPARK-18113(apache#16503 (comment)):

>askWithRetry is basically an unneeded API, and a leftover from the akka days that doesn't make sense anymore. It's prone to cause deadlocks (exactly because it's blocking), it imposes restrictions on the caller (e.g. idempotency) and other things that people generally don't pay that much attention to when using it.

Since `askWithRetry` is just used inside spark and not in user logic. It might make sense to replace all of them with `askSync`.

## How was this patch tested?
This PR doesn't change code logic, existing unit test can cover.

Author: jinxing <[email protected]>

Closes apache#16790 from jinxing64/SPARK-19450.
dongjoon-hyun pushed a commit that referenced this pull request May 24, 2022
…rpc.retry.wait` configs

### What changes were proposed in this pull request?

This PR cleans up the `spark.rpc.numRetries` and `spark.rpc.retry.wait` configs, both of which are unused.

### Why are the changes needed?

Since SPARK-19450 / #16790 in Spark 2.2.0, both of these configurations are unused and setting them has no effect. Marking the configs as deprecated and cleaning them up from the docs helps to avoid user confusion.

In addition, this cleanup slightly improves the performance of constructing `RpcEndpointRef`s because it removes two unused fields that were initialized by reading the deprecated configs.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

n/a

Closes #36645 from JoshRosen/cleanup-unused-rpc-configs.

Authored-by: Josh Rosen <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants