morningman commented on a change in pull request #5947:
URL: https://github.com/apache/incubator-doris/pull/5947#discussion_r654243756
##########
File path: fe/fe-core/src/main/java/org/apache/doris/backup/BackupHandler.java
##########
@@ -621,8 +681,16 @@ public static BackupHandler read(DataInput in) throws
IOException {
public void write(DataOutput out) throws IOException {
repoMgr.write(out);
- out.writeInt(dbIdToBackupOrRestoreJob.size());
- for (AbstractJob job : dbIdToBackupOrRestoreJob.values()) {
+ jobLock.lock();
Review comment:
Actually, we don't need to lock here, cause the `write()` method can
only be called in Checkpoint thread, so there is no concurrency issue.
And by the way, I think we can just use:
`for (AbstractJob job : dbIdToBackupOrRestoreJob.values())`
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]