Repository navigation
fix(sheet): record executor-close cleanup failures like the other steps - #1359
Open
Sean-Walker0 wants to merge 1 commit into
Open
Sean-Walker0 wants to merge 1 commit into
Sean-Walker0 wants to merge 1 commit into
Conversation
The executor-close step added with apache#1070 assigned its caught throwable directly (throwable = t), the only one of the seven cleanup blocks in ExcelAnalyserImpl.finish() not using recordFailure - the pattern every other block was unified onto by apache#1205. When an earlier cleanup step (the read-cache destroy) had already failed, a failing executor close overwrote the recorded failure, so callers saw the secondary exception and the original cause was lost. Use recordFailure like the sibling blocks: the first failure stays the cause and the later one is attached as suppressed. Verified with ExecutorCloseFailureRecordTest (a read-cache destroy failure followed by a failing executor close: before the change the executor exception overwrites the cause, after it the destroy failure stays the cause with the close failure suppressed) plus the existing ExcelAnalyserImplTest, the full fesod-sheet suite (1920 tests) and spotless:check.
This branch has not been deployed
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.
Purpose of the pull request
The executor-close cleanup step introduced with #1070 assigns its caught throwable directly:
It is the only one of the seven cleanup blocks in
ExcelAnalyserImpl.finish()not usingrecordFailure— the pattern the sibling blocks were unified onto by #1205 (which established "first failure is the cause, later ones are suppressed" for this exact method). When an earlier cleanup step (the read-cache destroy) has already failed, a failing executor close overwrites the recorded failure: callers see the secondary exception and the original cause is lost.No issue exists for this yet; found by sibling-comparison while reviewing the newly merged #1070.
What's changed?
One line: the block uses
recordFailure(throwable, t)like every sibling, keeping the first failure as the cause and attaching the executor-close failure as suppressed.Checklist
Verifying this change
ExecutorCloseFailureRecordTest— mocks aReadCachewhosedestroy()fails and anExcelReadExecutorwhoseclose()then fails, drives the realfinish()logic:red before (
the read-cache destroy failure happened first and must stay the cause ... was: executor close failed);green after: the destroy failure stays the cause, the close failure is attached as suppressed.
Existing
ExcelAnalyserImplTest(the fix: keep the first read-side cleanup failure and suppress later ones (#1204) #1205 regression test): still green../mvnw clean package -B -Dmaven.test.skip=false -pl fesod-common,fesod-shaded,fesod-sheet: 1920 tests, 0 failures../mvnw -pl fesod-sheet spotless:check: clean.Notes