ajothomas commented on code in PR #1708:
URL: https://github.com/apache/samza/pull/1708#discussion_r1811543063
##########
samza-core/src/main/scala/org/apache/samza/container/TaskInstance.scala:
##########
@@ -312,10 +317,22 @@ class TaskInstance(
val commitStartNs = System.nanoTime()
// first check if there were any unrecoverable errors during the async
stage of the pending commit
- // and if so, shut down the container.
+ // If there is unrecoverable error, increment the metric and the counter.
+ // Shutdown the container in the following scenarios:
+ // 1. skipCommitDuringFailureEnabled is not enabled
+ // 2. skipCommitDuringFailureEnabled is enabled but the number of
exceptions exceeded the max count
+ // Otherwise, ignore the exception.
if (commitException.get() != null) {
- throw new SamzaException("Unrecoverable error during pending commit for
taskName: %s." format taskName,
- commitException.get())
+ metrics.commitExceptions.inc()
+ commitExceptionCounter += 1
Review Comment:
We should be incrementing on successive commit failures right? What if a
commit succeeds, shouldn't we reset it to 0. Otherwise, whenever the 5th commit
failure is hit during the lifetime of the task in the container, the container
would fail.
--
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]