[ZEPPELIN-5450] Roll back failed note creation by chelsseeey · Pull Request #5532 · apache/zeppelin · GitHub
Skip to content

[ZEPPELIN-5450] Roll back failed note creation - #5532

Open
chelsseeey wants to merge 1 commit into
apache:masterfrom
chelsseeey:ZEPPELIN-5450-rollback-failed-note-creation
Open

chelsseeey wants to merge 1 commit into
apache:masterfrom
chelsseeey:ZEPPELIN-5450-rollback-failed-note-creation

Conversation

@chelsseeey

Copy link
Copy Markdown
Contributor

What is this PR for?

When note persistence fails because of file-system restrictions, the failed note can remain visible in Notebook Overview and newly created empty directories can be left behind.

This PR rolls back the in-memory note and authorization state when creation fails with an IOException or IllegalArgumentException, including invalid HDFS paths. It also removes temporary files and newly created empty directories after a failed VFS save while preserving directories that already existed.

What type of PR is it?

Bug Fix

Todos

  • Roll back note and authorization state after a failed save
  • Clean up VFS artifacts without removing existing directories
  • Add regression tests for file-name length and unchecked file-system errors

What is the Jira issue?

https://issues.apache.org/jira/browse/ZEPPELIN-5450

How should this be tested?

Automated tests cover:

  • A note name that exceeds the local file-system limit
  • An HDFS-like invalid path failure that throws IllegalArgumentException
  • Preservation of an existing parent directory after a failed save
./mvnw test -pl zeppelin-server -Dtest=NotebookServiceTest,VFSNotebookRepoTest
./mvnw clean org.apache.rat:apache-rat-plugin:check -Prat

Screenshots (if appropriate)

Not applicable

Questions:

  • Does the license files need to update? No.
  • Is there breaking changes for older versions? No.
  • Does this needs documentation? No.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant