[ZEPPELIN-6453] Handle secondary NotebookRepo remove failures consistently#5289
Merged
jongyoul merged 1 commit intoJul 12, 2026
Merged
Conversation
…ently Make remove() handle primary/secondary repo failures the same way save() and move() already do: primary failure propagates the exception, secondary failure is caught and logged. - Replace the for-loop with explicit getRepo(0)/getRepo(1) calls - Remove the TODO comment that requested this change - Add unit tests for both primary and secondary failure scenarios
jongyoul
approved these changes
Jul 12, 2026
jongyoul
left a comment
Member
There was a problem hiding this comment.
Reviewed the primary/secondary removal failure handling and its unit tests. The behavior is consistent with save() and move().
Member
|
Merged into master (7bb88ca). |
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.
What is this PR for?
In
NotebookRepoSync, secondary storage failures were already handled forsave()andmove(), butremove()still used a genericforloop with aTODOcomment for handling secondary remove failures.This PR makes the
remove()failure handling consistent with the existingsave()andmove()behavior:getRepo(0)): A failure during removal stops the operation and propagates theIOException.getRepo(1)): A failure during removal is caught and explicitly logged, preventing silent inconsistencies without interrupting the overall operation.To achieve this, the
forloop inremove(String noteId, String notePath, AuthenticationInfo subject)was replaced with explicitgetRepo(0)andgetRepo(1)calls, and the outstandingTODOwas removed.What type of PR is it?
Improvement
What is the Jira issue?
How should this be tested?
Tested via
NotebookRepoSyncTestusing Mockito to explicitly verify the primary vs. secondary failure behaviors:testRemoveSucceedsWhenSecondaryRepoFails: Verifies that anIOExceptionfrom the secondary repo is caught and does not stop the removal process.testRemoveFailsWhenPrimaryRepoFails: Verifies that anIOExceptionfrom the primary repo halts the operation and propagates the exception.NotebookRepoSyncTestcontinue to pass.Screenshots (if appropriate)
N/A
Questions: