sodonnel commented on code in PR #5485:
URL: https://github.com/apache/ozone/pull/5485#discussion_r1420226242
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueContainerCheck.java:
##########
@@ -263,10 +265,25 @@ private ScanResult scanData(DataTransferThrottler
throttler,
if (getBlockDataFromDBWithLock(db, block) != null) {
// Block was not deleted, the failure is legitimate.
return result;
- } else if (LOG.isDebugEnabled()) {
+ } else {
+ // If schema V3 and container details not in DB or
+ // if containerDBPath is removed
+ if ((onDiskContainerData.hasSchema(OzoneConsts.SCHEMA_V3) &&
Review Comment:
Would it be simpler to check if the container entry is removed from the
container map in memory? What order does a "delete container" work? For Schema
V3, it needs to at least:
1. Remove the entries from the DB
2. Remove the files from disk
3. Remove the entry from the in memory map.
I also wonder about locking - is there a "container lock"? Does the scanner
use it while scanning, and the delete flow use it while deleting?
The solution here seems OK, but these are the things i thought of as I
looked at this.
--
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]