eason-yuchen-liu commented on code in PR #55676:
URL: https://github.com/apache/spark/pull/55676#discussion_r3197844592
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/checkpointing/AsyncOffsetSeqLog.scala:
##########
@@ -142,6 +143,14 @@ class AsyncOffsetSeqLog(
} else {
executorService.submit(new Runnable {
Review Comment:
I think it is valid alternative. The difference is that the futures are
created at runtime, and we need to pass the previous future to the next submit
to form a perfect chain, which may be prone to error IMO. Honestly, compared to
the current approach, I do not see an advantage of this alternative. Please let
me know if you think it is a strictly better approach.
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/runtime/AsyncProgressTrackingMicroBatchExecution.scala:
##########
@@ -295,6 +303,11 @@ class AsyncProgressTrackingMicroBatchExecution(
}
}
+ private def recordAsyncWriteError(th: Throwable): Unit = {
+ firstAsyncWriteError.compareAndSet(null, th)
+ errorNotifier.markError(th)
Review Comment:
Yep, good idea. We can avoid creating a new variable.
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/checkpointing/AsyncOffsetSeqLog.scala:
##########
@@ -36,7 +36,8 @@ class AsyncOffsetSeqLog(
path: String,
executorService: ThreadPoolExecutor,
offsetCommitIntervalMs: Long,
- clock: Clock = new SystemClock())
+ clock: Clock = new SystemClock(),
+ asyncWriteError: AtomicReference[Throwable] = new
AtomicReference[Throwable]())
Review Comment:
Yep, good idea.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]