Skip to content

Comments

[SPARK-54551][CONNECT][TESTS] Fix random hangs in SparkConnectJdbcDataTypeSuite#53261

Closed
vinodkc wants to merge 1 commit intoapache:masterfrom
vinodkc:br_handle_std_pipe
Closed

[SPARK-54551][CONNECT][TESTS] Fix random hangs in SparkConnectJdbcDataTypeSuite#53261
vinodkc wants to merge 1 commit intoapache:masterfrom
vinodkc:br_handle_std_pipe

Conversation

@vinodkc
Copy link
Contributor

@vinodkc vinodkc commented Nov 28, 2025

What changes were proposed in this pull request?

Added explicit stdout/stderr redirection to Redirect.DISCARD for the child Spark Connect server process in non-debug mode in SparkConnectServerUtils.

Why are the changes needed?

SparkConnectJdbcDataTypeSuite randomly hangs because the child server process blocks on write() calls when stdout/stderr pipe buffers fill up. Without consuming the output, the buffers reach capacity and cause the process to block indefinitely.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Manually tested verified SparkConnectJdbcDataTypeSuite no longer randomly hangs and all tests pass consistently.

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

No

@vinodkc
Copy link
Contributor Author

vinodkc commented Nov 28, 2025

CC @pan3793 , @dongjoon-hyun @cloud-fan

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-54551][CONNECT] Fix random hangs in SparkConnectJdbcDataTypeSuite [SPARK-54551][CONNECT][TESTS] Fix random hangs in SparkConnectJdbcDataTypeSuite Nov 29, 2025
Copy link
Member

@pan3793 pan3793 left a comment

Choose a reason for hiding this comment

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

The change makes sense to me

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 for this test change. Thank you, @vinodkc , @cloud-fan , @pan3793 .
Merged to master/4.1 for Apache Spark 4.1.0.

dongjoon-hyun pushed a commit that referenced this pull request Nov 29, 2025
…aTypeSuite

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

Added explicit stdout/stderr redirection to Redirect.DISCARD for the child Spark Connect server process in non-debug mode in SparkConnectServerUtils.

### Why are the changes needed?

SparkConnectJdbcDataTypeSuite randomly hangs because the child server process blocks on write() calls when stdout/stderr pipe buffers fill up. Without consuming the output, the buffers reach capacity and cause the process to block indefinitely.

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

No.

### How was this patch tested?

Manually tested verified `SparkConnectJdbcDataTypeSuite` no longer randomly hangs and all tests pass consistently.

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

No

Closes #53261 from vinodkc/br_handle_std_pipe.

Authored-by: vinodkc <vinod.kc.in@gmail.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit 99270f0)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants