Fix stage write resource leak on speculative execution kill#102
Open
Zouxxyy wants to merge 2 commits into
Open
Fix stage write resource leak on speculative execution kill#102Zouxxyy wants to merge 2 commits into
Zouxxyy wants to merge 2 commits into
Conversation
When a speculative task is killed, abort() no longer flushes the broken Arrow channel. Instead it aborts the stageWrapper (close resources without flush), drops the orphaned stage, and fixes the connectionHolder leak. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…nabled In copyStageOnly mode, stages are intentionally preserved for external consumers. Batch-level abort should not drop successfully committed stages. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
abort()no longer flushes the broken Arrow channel, avoidingClosedChannelExceptioncascadesabort()actively drops the orphaned stage instead of relying on 7200s TTL expirationCopyInStageWrapperconnectionHolderleak (never closed in any code path before)HoloBatchWriter.abort()now cleans up stages on job-level failureBackground
When speculative execution kills a stage write task, the current
abort()attempts to flush an already-interrupted Arrow channel, causing cascading exceptions. The created stage is never dropped, and the connectionHolder is never closed.Executor log (sanitized):
After fix:
Test plan
mvn compile -pl hologres-connector-spark-3.x -am -DskipTestsspark.speculation=true, run a skewed write-to-Hologres jobClosedChannelExceptioncascades in executor logsSELECT * FROM hologres.hg_internal_stage_infoshows no orphaned stages🤖 Generated with Claude Code