wuyi created SPARK-50768:
----------------------------
Summary: Pontential file stream leaks caused by task thread
interruption
Key: SPARK-50768
URL: https://issues.apache.org/jira/browse/SPARK-50768
Project: Spark
Issue Type: Improvement
Components: Spark Core
Affects Versions: 3.5.3
Reporter: wuyi
SPAKR-49980 tried to fix this kind of issue by applying
{code:java}
def tryInitializeResource[R <: Closeable, T](createResource: => R)(initialize:
R => T): T = {
val resource = createResource
try {
initialize(resource)
} catch {
case e: Throwable =>
resource.close()
throw e
}
} {code}
when creating resources. This utility function has an issue that it assumes the
task interruption happpens exactly during the `initialize(resource)`. But it is
not always true. And so the issue actully still exits.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]