smengcl commented on code in PR #4701:
URL: https://github.com/apache/ozone/pull/4701#discussion_r1197185770
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/DirectoryDeletingService.java:
##########
@@ -154,15 +156,29 @@ public BackgroundTaskResult call() {
subFileNum += request.getDeletedSubFilesCount();
}
- optimizeDirDeletesAndSubmitRequest(remainNum, dirNum, subDirNum,
- subFileNum, allSubDirList, purgePathRequestList, null,
startTime);
+ // Acquire deletedTable write lock this late to allow KeyDeletingTask
+ // to interleave up until this point
+ getOzoneManager().getMetadataManager().getTableLock(
Review Comment:
I think you are right.
Initially I noticed `deletedTable` write inside
`OMDirectoriesPurgeResponseWithFSO#addToDBBatch`. But `addToDBBatch()`es are
serialized so that's not an actual concern. Because
`createOmSnapshotCheckpoint()` is called inside another `addToDBBatch()` as
well. Especially now that we solved the `deletedTable` race condition with
#4602 .
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]