You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@zeppelin.apache.org by "HwangRock (via GitHub)" <gi...@apache.org> on 2026/07/12 09:01:28 UTC
[PR] [ZEPPELIN-6345] Fire NoteRemove event for each note when deleting a folder [zeppelin]
HwangRock opened a new pull request, #5292:
URL: https://github.com/apache/zeppelin/pull/5292
### What is this PR for?
Deleting a folder left its notes searchable after removal. `removeFolder(String, AuthenticationInfo)` in `Notebook` called `noteManager.removeFolder` first, which detached the notes from the tree, so the following `removeNote(noteId)` loaded a `null` note and skipped `fireNoteRemoveEvent`. `SearchService.deleteNoteIndex` was therefore never invoked and the Lucene search index kept stale documents for the deleted notes, so they still showed up in search results after emptying the trash or removing a folder.
This PR loads the notes non-destructively via a new `NoteManager.getNoteInfoRecursively`, runs the same per-note cleanup as `removeNote(Note, AuthenticationInfo)` (`setRemoved`, `removeNoteAuth`, `fireNoteRemoveEvent`) for each note, and only then deletes the folder. This also removes the pre-existing `NotebookRepo.remove is called twice` TODO, since the repo remove now happens once.
### What type of PR is it?
Bug Fix
### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-6345
### How should this be tested?
* Added `NotebookTest#testRemoveFolderFiresNoteRemoveEventForEachNote`: creates two notes under `/folder1`, registers a `NoteEventListener` counting `onNoteRemove`, calls `removeFolder("/folder1", ...)`, and asserts the event fired once per note. Fails before the change (count `0`), passes after.
* Manual: create notes, move them to trash, empty the trash, then search for a deleted note. Before the fix it still appears in results; after the fix it is gone.
### Questions:
* Does the license files need to update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6345] Fire NoteRemove event for each note when deleting a folder [zeppelin]
Posted by "ParkGyeongTae (via GitHub)" <gi...@apache.org>.
ParkGyeongTae merged PR #5292:
URL: https://github.com/apache/zeppelin/pull/5292
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6345] Fire NoteRemove event for each note when deleting a folder [zeppelin]
Posted by "hyunw9 (via GitHub)" <gi...@apache.org>.
hyunw9 commented on PR #5292:
URL: https://github.com/apache/zeppelin/pull/5292#issuecomment-4951663663
LGTM :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6345] Fire NoteRemove event for each note when deleting a folder [zeppelin]
Posted by "ParkGyeongTae (via GitHub)" <gi...@apache.org>.
ParkGyeongTae commented on PR #5292:
URL: https://github.com/apache/zeppelin/pull/5292#issuecomment-4959040790
Merged into master (0c4b30f8).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6345] Fire NoteRemove event for each note when deleting a folder [zeppelin]
Posted by "HwangRock (via GitHub)" <gi...@apache.org>.
HwangRock commented on PR #5292:
URL: https://github.com/apache/zeppelin/pull/5292#issuecomment-4958489843
@ParkGyeongTae Thanks for filing ZEPPELIN-6529 and letting me know! Confirmed the bug and sent a PR here: https://github.com/apache/zeppelin/pull/5296
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6345] Fire NoteRemove event for each note when deleting a folder [zeppelin]
Posted by "ParkGyeongTae (via GitHub)" <gi...@apache.org>.
ParkGyeongTae commented on PR #5292:
URL: https://github.com/apache/zeppelin/pull/5292#issuecomment-4959026065
Thanks for the quick follow-up! I'll take a look at #5296.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org