[
https://issues.apache.org/jira/browse/SPARK-61582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Szehon Ho updated SPARK-61582:
------------------------------
Description:
h3. Pull request
[apache/spark#60406|https://github.com/apache/spark/pull/60406]
h3. Motivation
{{WriteDistributionAndOrderingSuite}} registered a custom query execution
listener for every
write and never unregistered it. The shared {{withQueryExecutionsCaptured}}
helper unregisters
its listener in a {{finally}} block, including when a write fails.
h3. Coverage traceability
* All 99 test cases and configuration combinations remain.
* All {{V2TableWriteExec}} plan checks and written-result assertions remain.
* The intentional behavior difference is that {{val Seq(qe)}} now requires
exactly one captured
successful execution. The old listener retained only the last execution when
several were
observed and left a null plan when none was observed.
* Failure-path exceptions still propagate because the shared helper does not
catch them.
h3. Benchmark
Two local runs of the full suite on each commit produced:
|| Commit || Run 1 || Run 2 || Average ||
| Parent ({{0d52f01d106}}) | 47.300 s | 47.871 s | 47.586 s |
| PR ({{18efea66d5c}}) | 47.829 s | 47.433 s | 47.631 s |
The 0.046-second (0.1%) difference is within run-to-run noise, so this change
has no measurable
effect on full-suite wall time. Its benefit is deterministic listener cleanup.
> Clean up query execution listeners in DSv2 write tests
> ------------------------------------------------------
>
> Key: SPARK-61582
> URL: https://issues.apache.org/jira/browse/SPARK-61582
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 5.0.0
> Reporter: Szehon Ho
> Priority: Major
> Labels: pull-request-available
>
> h3. Pull request
> [apache/spark#60406|https://github.com/apache/spark/pull/60406]
> h3. Motivation
> {{WriteDistributionAndOrderingSuite}} registered a custom query execution
> listener for every
> write and never unregistered it. The shared {{withQueryExecutionsCaptured}}
> helper unregisters
> its listener in a {{finally}} block, including when a write fails.
> h3. Coverage traceability
> * All 99 test cases and configuration combinations remain.
> * All {{V2TableWriteExec}} plan checks and written-result assertions remain.
> * The intentional behavior difference is that {{val Seq(qe)}} now requires
> exactly one captured
> successful execution. The old listener retained only the last execution
> when several were
> observed and left a null plan when none was observed.
> * Failure-path exceptions still propagate because the shared helper does not
> catch them.
> h3. Benchmark
> Two local runs of the full suite on each commit produced:
> || Commit || Run 1 || Run 2 || Average ||
> | Parent ({{0d52f01d106}}) | 47.300 s | 47.871 s | 47.586 s |
> | PR ({{18efea66d5c}}) | 47.829 s | 47.433 s | 47.631 s |
> The 0.046-second (0.1%) difference is within run-to-run noise, so this change
> has no measurable
> effect on full-suite wall time. Its benefit is deterministic listener cleanup.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]