SaketaChalamchala commented on code in PR #5485:
URL: https://github.com/apache/ozone/pull/5485#discussion_r1423221069
##########
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:
Thanks for the review @sodonnel You're right. This is the container delete
is handled in `KeyValueHandler.java`
```
1. containerSet.removeContainer(containerId); // removes container from mem
map
2. KeyValueContainerUtil.removeContainerDB; // removes container entries
from DB
3. KeyValueContainerUtil.moveToDeletedContainerDir; // removes container dir
from disk.
```
The scanner does attempt to read the container with a lock if the scanBlock
fails once on L265. We try to check if the container is deleted if this read
with lock fails. Is this what you meant? It would be easier to check the
container state is removed from the mem map instead of checking the DB. I will
update the PR.
--
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]