Call inserter.flush() when creating code review notes
Failing to do this can cause the notes blobs to not get written to storage, particularly with JGit's DfsInserter. Change-Id: I28168374ddf9f89f5107a91bfba44f345ef395cf
This commit is contained in:
@@ -117,6 +117,7 @@ public class CreateCodeReviewNotes {
|
||||
NotesBranchUtil notesBranchUtil = notesBranchUtilFactory.create(db);
|
||||
notesBranchUtil.commitAllNotes(notes, REFS_NOTES_REVIEW, author,
|
||||
message.toString());
|
||||
inserter.flush();
|
||||
} catch (IOException e) {
|
||||
throw new CodeReviewNoteCreationException(e);
|
||||
} catch (ConcurrentRefUpdateException e) {
|
||||
@@ -151,6 +152,7 @@ public class CreateCodeReviewNotes {
|
||||
NotesBranchUtil notesBranchUtil = notesBranchUtilFactory.create(db);
|
||||
notesBranchUtil.commitAllNotes(notes, REFS_NOTES_REVIEW, author,
|
||||
commitMessage);
|
||||
inserter.flush();
|
||||
} catch (ConcurrentRefUpdateException e) {
|
||||
throw new CodeReviewNoteCreationException(e);
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user