saLeox commented on code in PR #4374:
URL: https://github.com/apache/zeppelin/pull/4374#discussion_r884708245
##########
zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NoteManager.java:
##########
@@ -181,7 +182,9 @@ public void saveNote(Note note, AuthenticationInfo subject)
throws IOException {
} else {
addOrUpdateNoteNode(new NoteInfo(note));
noteCache.putNote(note);
- this.notebookRepo.save(note, subject);
+ synchronized (this) {
Review Comment:
The reason makes it `synchronized` is that the `note` object will be empty
in the case of concurrent saveNote, which comes from following code:
```note = notebookRepo.get(noteInfo.getId(), noteInfo.getPath(),
AuthenticationInfo.ANONYMOUS);```
And since it's just an abstract function, I just add `synchronized` to make
it return non-empty object.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]