Philipp Dallig created ZEPPELIN-5188:
----------------------------------------
Summary: Fix CreateNote() function throw Note existed IOException
caused CI to fail
Key: ZEPPELIN-5188
URL: https://issues.apache.org/jira/browse/ZEPPELIN-5188
Project: Zeppelin
Issue Type: Bug
Reporter: Philipp Dallig
>From time to time I see exception like this during CI
{code}
2021-01-04T13:54:42.2559442Z
testAngularObjects[0](org.apache.zeppelin.integration.ZeppelinSparkClusterTest22)
Time elapsed: 0.001 sec <<< ERROR!
2021-01-04T13:54:42.2561551Z java.io.IOException: Note '/note1' existed
2021-01-04T13:54:42.2563258Z at
org.apache.zeppelin.notebook.NoteManager.addOrUpdateNoteNode(NoteManager.java:129)
2021-01-04T13:54:42.2565545Z at
org.apache.zeppelin.notebook.NoteManager.addNote(NoteManager.java:190)
2021-01-04T13:54:42.2567421Z at
org.apache.zeppelin.notebook.Notebook.createNote(Notebook.java:256)
2021-01-04T13:54:42.2569272Z at
org.apache.zeppelin.notebook.Notebook.createNote(Notebook.java:237)
2021-01-04T13:54:42.2571103Z at
org.apache.zeppelin.notebook.Notebook.createNote(Notebook.java:204)
2021-01-04T13:54:42.2574092Z at
org.apache.zeppelin.integration.ZeppelinSparkClusterTest.testAngularObjects(ZeppelinSparkClusterTest.java:815)
2021-01-04T13:54:42.2576989Z at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2021-01-04T13:54:42.2578871Z at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2021-01-04T13:54:42.2581154Z at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2021-01-04T13:54:42.2582941Z at
java.lang.reflect.Method.invoke(Method.java:498)
2021-01-04T13:54:42.2584387Z at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
2021-01-04T13:54:42.2586529Z at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
{code}
I think the cause of the problem is a race condition between multiple threads.
As you can see in the following output, note1 is removed and immediately
afterwards another thread saves the note again.
{code}
2021-01-04T13:54:39.1701901Z INFO [2021-01-04 13:54:39,169]
({JobStatusPoller-paragraph_1609768479053_1839084385}
NotebookServer.java[onStatusChange]:1932) - Job
paragraph_1609768479053_1839084385 starts to RUNNING
2021-01-04T13:54:39.1711525Z INFO [2021-01-04 13:54:39,170]
({JobStatusPoller-paragraph_1609768479053_1839084385}
VFSNotebookRepo.java[save]:144) - Saving note 2FV54X681 to note1_2FV54X681.zpln
2021-01-04T13:54:39.6570394Z INFO [2021-01-04 13:54:39,656]
({SchedulerFactory100} NotebookServer.java[onStatusChange]:1927) - Job
paragraph_1609768479053_1839084385 is finished successfully, status: FINISHED
2021-01-04T13:54:39.6677608Z INFO [2021-01-04 13:54:39,657] ({main}
Notebook.java[removeNote]:334) - Remove note: 2FV54X681
2021-01-04T13:54:39.6679179Z INFO [2021-01-04 13:54:39,657] ({main}
VFSNotebookRepo.java[remove]:192) - Remove note: 2FV54X681, notePath: /note1
2021-01-04T13:54:39.6700726Z INFO [2021-01-04 13:54:39,657]
({SchedulerFactory100} VFSNotebookRepo.java[save]:144) - Saving note 2FV54X681
to note1_2FV54X681.zpln
2021-01-04T13:54:39.6703035Z INFO [2021-01-04 13:54:39,657] ({main}
InterpreterSettingManager.java[copyDependenciesFromLocalPath]:783) - Start to
copy dependencies for interpreter: spark
2021-01-04T13:54:39.6705619Z INFO [2021-01-04 13:54:39,658] ({main}
InterpreterSettingManager.java[copyDependenciesFromLocalPath]:794) - Finish
copy dependencies for interpreter: spark
2021-01-04T13:54:39.6708158Z INFO [2021-01-04 13:54:39,658] ({main}
ManagedInterpreterGroup.java[close]:102) - Close Session: shared_session for
interpreter setting: spark
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)