[SYSTEMDS-3923] Improve exception handling OOC instructions #2346
+199
−57
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch introduces a new failure-propagation mechanism for out-of-core (OOC) tasks via the
LocalTaskQueue.Previously, unexpected exceptions in OOC tasks could silently fail, leaving upstream tasks waiting indefinitely because their output streams were never closed. To address this, we now propagate exceptions through the queue hierarchy, ensuring upstream and downstream threads are properly interrupted.
LocalTaskQueuemaintains an exception state that allows both enqueue and dequeue operations to rethrow the stored exception, propagating errors across dependent queues. When a failure occurs, all related queues are notified, cascading the exception until it reaches the main thread and any other affected tasks.Additionally, a common OOC task submission method was added to
OOCInstructionto replace manual submission viaCommonThreadPool. This ensures consistent exception propagation and simplifies OOC task management.