anishshri-db commented on code in PR #50742: URL: https://github.com/apache/spark/pull/50742#discussion_r2067631028
########## sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/package.scala: ########## @@ -109,9 +110,16 @@ package object state { val cleanedF = dataRDD.sparkContext.clean(storeReadFn) val wrappedF = (store: ReadStateStore, iter: Iterator[T]) => { // Clean up the state store. - TaskContext.get().addTaskCompletionListener[Unit](_ => { - store.abort() + val taskContext = TaskContext.get() + taskContext.addTaskCompletionListener[Unit](_ => { Review Comment: Why do we need it again here ? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org