-
Notifications
You must be signed in to change notification settings - Fork 588
HDDS-13238. Scan container and volume in container import & export, EC reconstruction, reconciliation #8893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
8f4a9aa to
33bee60
Compare
...tainer-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java
Show resolved
Hide resolved
|
In this PR, let's also update this location which gets triggered when the container file cannot be updated. We should do an on-demand container scan first, and only a volume scan if that fails. However, we don't want to trigger the on-demand container scan in this exact spot in case this is being called to mark the container unhealthy, or it will get stuck in a loop. Instead we probably want to trigger it here. Note that if a container scan fails due to permission errors, the result will only be kept in memory. Persistence will fail since we don't have permission to update the file, but that is desirable since permissions can be restored on restart. Let's add a comment explaining that in this scan location as well. |
errose28
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this @Tejaskriya. Can you address the merge conflict? I think the reconciliation test will need to be updated after #8908 because the failure being injected is in peer communication, which no longer causes a complete failure of reconciliation. Instead you could introduce a local issue like removing the container's directory from the disk before trying to reconcile, which should cause early calls like this to fail.
...in/java/org/apache/hadoop/ozone/container/ec/reconstruction/ECReconstructionCoordinator.java
Outdated
Show resolved
Hide resolved
...tainer-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java
Outdated
Show resolved
Hide resolved
|
@errose28 I have made the changes as described in your review comments above, please take a look again, thanks! |
errose28
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prod code LGTM, just minor comments on tests.
...tainer-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java
Outdated
Show resolved
Hide resolved
...er-service/src/test/java/org/apache/hadoop/ozone/container/keyvalue/TestKeyValueHandler.java
Outdated
Show resolved
Hide resolved
...er-service/src/test/java/org/apache/hadoop/ozone/container/keyvalue/TestKeyValueHandler.java
Outdated
Show resolved
Hide resolved
...tegration-test/src/test/java/org/apache/hadoop/hdds/scm/storage/TestContainerCommandsEC.java
Show resolved
Hide resolved
...org/apache/hadoop/ozone/container/keyvalue/TestContainerReconciliationWithMockDatanodes.java
Show resolved
Hide resolved
errose28
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this @Tejaskriya.
What changes were proposed in this pull request?
This PR adds container scans in the following cases:
And volume scan is triggered during the following cases:
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-13238
How was this patch tested?
Added unit tests