Skip to content

[SPARK-56469][SQL][TESTS] BufferedRowsReader lifecycle hardening#55336

Closed
peter-toth wants to merge 1 commit intoapache:masterfrom
peter-toth:SPARK-56469-bufferedrowsreader-lifecycle-hardening
Closed

[SPARK-56469][SQL][TESTS] BufferedRowsReader lifecycle hardening#55336
peter-toth wants to merge 1 commit intoapache:masterfrom
peter-toth:SPARK-56469-bufferedrowsreader-lifecycle-hardening

Conversation

@peter-toth
Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Extracted from #55116.

The test-framework reader in InMemoryBaseTable now tracks a closed flag and throws IllegalStateException for reads, double-closes, or metric fetches on a closed reader. This ensures future tests catch reader lifecycle bugs that were previously hidden by the noop close().

Why are the changes needed?

Improve test framework.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Existing UTs.

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

No.

@peter-toth
Copy link
Copy Markdown
Contributor Author

cc @dongjoon-hyun

@peter-toth peter-toth force-pushed the SPARK-56469-bufferedrowsreader-lifecycle-hardening branch from 11a1fb8 to d02d82a Compare April 14, 2026 13:52
Copy link
Copy Markdown
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, @peter-toth .

@dongjoon-hyun
Copy link
Copy Markdown
Member

Currently SparkConnectSessionHolderSuite seems to hang for some reasons. Normally it finished quickly. Since it seems to be an unknown flaky test case, could you kill and re-trigger this test pipeline, please?

[info] SparkConnectPlannerSuite:
[info] *** Test still running after 12 minutes, 43 seconds: suite name: SparkConnectSessionHolderSuite, test name: python foreachBatch process: process terminates after query is stopped. 
[info] *** Test still running after 17 minutes, 43 seconds: suite name: SparkConnectSessionHolderSuite, test name: python foreachBatch process: process terminates after query is stopped. 
[info] *** Test still running after 22 minutes, 43 seconds: suite name: SparkConnectSessionHolderSuite, test name: python foreachBatch process: process terminates after query is stopped. 
[info] *** Test still running after 27 minutes, 43 seconds: suite name: SparkConnectSessionHolderSuite, test name: python foreachBatch process: process terminates after query is stopped. 
[info] *** Test still running after 32 minutes, 43 seconds: suite name: SparkConnectSessionHolderSuite, test name: python foreachBatch process: process terminates after query is stopped. 
[info] *** Test still running after 37 minutes, 43 seconds: suite name: SparkConnectSessionHolderSuite, test name: python foreachBatch process: process terminates after query is stopped. 
[info] *** Test still running after 42 minutes, 43 seconds: suite name: SparkConnectSessionHolderSuite, test name: python foreachBatch process: process terminates after query is stopped. 
[info] *** Test still running after 47 minutes, 43 seconds: suite name: SparkConnectSessionHolderSuite, test name: python foreachBatch process: process terminates after query is stopped. 
[info] *** Test still running after 52 minutes, 43 seconds: suite name: SparkConnectSessionHolderSuite, test name: python foreachBatch process: process terminates after query is stopped. 

@peter-toth
Copy link
Copy Markdown
Contributor Author

I've just retriggered it.

@dongjoon-hyun
Copy link
Copy Markdown
Member

Merged to master for Apache Spark 4.2.0.

@peter-toth
Copy link
Copy Markdown
Contributor Author

Thank you @dongjoon-hyun!

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.

2 participants