Skip to content

Conversation

@accountas
Copy link
Contributor

@accountas accountas commented Sep 2, 2025

Changes

  • Check running flag before swallowing interrupt exception in the commit thread. Flag is false after interrupting from the happy shutdown path. If flag is true exception is unexpected and should be propagated.
  • Remove the cause check from isInterruptionException. Swallowing interrupt exception this way is a bad practice, so we can expect this to never happen. At the moment it's too aggressive.

Why?

Current implementation can cause data loss. For example, in our environment while loading to Google Cloud Storage we observed the following exception being thrown from time to time:

com.google.cloud.storage.StorageException: Read timed out
...
Caused by: java.net.SocketTimeoutException: Read timed out

SocketTimeoutException is a subclass of InterruptedIOException which is caught by the isInterruptionException.

This causes the commit to fail, the exception being completely ignored (debug log is the only indication) and loading to continue by skipping the batch completely.

@accountas accountas force-pushed the fix-data-loss branch 2 times, most recently from 0141de0 to 1db4d04 Compare September 3, 2025 12:23
@Srb1996 Srb1996 merged commit 648ca66 into adform:master Sep 11, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants