Skip to content

Conversation

@JoshRosen
Copy link
Contributor

What changes were proposed in this pull request?

#41785 / SPARK-44241 introduced a new awaitUninterruptibly() call in one branch of TrasportClientFactory.createClient() (executed when the connection create timeout is non-positive). This PR replaces that call with an interruptible await() call.

Note that the other pre-existing branches in this method were already using await().

Why are the changes needed?

Uninterruptible waiting can cause problems when cancelling tasks. For details, see #16866 / SPARK-19529, an older PR fixing a similar issue in this same TransportClientFactory.createClient() method.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Existing tests.

Was this patch authored or co-authored using generative AI tooling?

No.

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM. Thank you so much, @JoshRosen .

@dongjoon-hyun
Copy link
Member

Could you re-trigger the failed test cases although it looks irrelevant, @JoshRosen ?

@yaooqinn yaooqinn closed this in 2137606 Aug 23, 2023
yaooqinn pushed a commit that referenced this pull request Aug 23, 2023
…TransportClientFactory.createClient()

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

#41785 / SPARK-44241 introduced a new `awaitUninterruptibly()` call in one branch of `TrasportClientFactory.createClient()` (executed when the connection create timeout is non-positive). This PR replaces that call with an interruptible `await()` call.

Note that the other pre-existing branches in this method were already using `await()`.

### Why are the changes needed?

Uninterruptible waiting can cause problems when cancelling tasks. For details, see #16866 / SPARK-19529, an older PR fixing a similar issue in this same `TransportClientFactory.createClient()` method.

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

No.

### How was this patch tested?

Existing tests.

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes #42619 from JoshRosen/remove-awaitUninterruptibly.

Authored-by: Josh Rosen <[email protected]>
Signed-off-by: Kent Yao <[email protected]>
(cherry picked from commit 2137606)
Signed-off-by: Kent Yao <[email protected]>
yaooqinn pushed a commit that referenced this pull request Aug 23, 2023
…TransportClientFactory.createClient()

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

#41785 / SPARK-44241 introduced a new `awaitUninterruptibly()` call in one branch of `TrasportClientFactory.createClient()` (executed when the connection create timeout is non-positive). This PR replaces that call with an interruptible `await()` call.

Note that the other pre-existing branches in this method were already using `await()`.

### Why are the changes needed?

Uninterruptible waiting can cause problems when cancelling tasks. For details, see #16866 / SPARK-19529, an older PR fixing a similar issue in this same `TransportClientFactory.createClient()` method.

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

No.

### How was this patch tested?

Existing tests.

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes #42619 from JoshRosen/remove-awaitUninterruptibly.

Authored-by: Josh Rosen <[email protected]>
Signed-off-by: Kent Yao <[email protected]>
(cherry picked from commit 2137606)
Signed-off-by: Kent Yao <[email protected]>
yaooqinn pushed a commit that referenced this pull request Aug 23, 2023
…TransportClientFactory.createClient()

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

#41785 / SPARK-44241 introduced a new `awaitUninterruptibly()` call in one branch of `TrasportClientFactory.createClient()` (executed when the connection create timeout is non-positive). This PR replaces that call with an interruptible `await()` call.

Note that the other pre-existing branches in this method were already using `await()`.

### Why are the changes needed?

Uninterruptible waiting can cause problems when cancelling tasks. For details, see #16866 / SPARK-19529, an older PR fixing a similar issue in this same `TransportClientFactory.createClient()` method.

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

No.

### How was this patch tested?

Existing tests.

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes #42619 from JoshRosen/remove-awaitUninterruptibly.

Authored-by: Josh Rosen <[email protected]>
Signed-off-by: Kent Yao <[email protected]>
(cherry picked from commit 2137606)
Signed-off-by: Kent Yao <[email protected]>
@yaooqinn
Copy link
Member

Thanks @JoshRosen @cloud-fan @HyukjinKwon and @dongjoon-hyun

Merged to master, '3.5.0', '3.4.2', and '3.3.4'

viirya pushed a commit to viirya/spark-1 that referenced this pull request Oct 19, 2023
…TransportClientFactory.createClient()

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

apache#41785 / SPARK-44241 introduced a new `awaitUninterruptibly()` call in one branch of `TrasportClientFactory.createClient()` (executed when the connection create timeout is non-positive). This PR replaces that call with an interruptible `await()` call.

Note that the other pre-existing branches in this method were already using `await()`.

### Why are the changes needed?

Uninterruptible waiting can cause problems when cancelling tasks. For details, see apache#16866 / SPARK-19529, an older PR fixing a similar issue in this same `TransportClientFactory.createClient()` method.

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

No.

### How was this patch tested?

Existing tests.

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes apache#42619 from JoshRosen/remove-awaitUninterruptibly.

Authored-by: Josh Rosen <[email protected]>
Signed-off-by: Kent Yao <[email protected]>
(cherry picked from commit 2137606)
Signed-off-by: Kent Yao <[email protected]>
FMX pushed a commit to apache/celeborn that referenced this pull request Apr 19, 2024
…tive celeborn.<module>.io.connectTimeout/connectionTimeout

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

`TransportClientFactory` should regard as zero for negative `celeborn.<module>.io.connectTimeout` and `celeborn.<module>.io.connectionTimeout`.

### Why are the changes needed?

When `celeborn.<module>.io.connectionTimeout` is 0 that means unlimited to netty, `ChannelFuture.await(0)` fails directly and inappropriately. Meanwhile, whhen `celeborn.<module>.io.connectionTimeout` is less than 0 that causes meaningless transport client reconnections and endless reconstructions.

Backport:

- apache/spark#41785
- apache/spark#42619

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

No.

### How was this patch tested?

`TransportClientFactorySuiteJ#unlimitedConnectAndConnectionTimeouts`

Closes #2467 from SteNicholas/CELEBORN-1392.

Authored-by: SteNicholas <[email protected]>
Signed-off-by: mingji <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants