Uh oh!
There was an error while loading. Please reload this page.
HDDS-3082. Refactor recon missing containers task to detect under, over and mis-replicated containers. - #994
Conversation
vivekratnavel
left a comment
There was a problem hiding this comment.
+1 LGTM.
Posted a few minor suggestions inline.
Uh oh!
There was an error while loading. Please reload this page.
| containers.forEach(container -> | ||
| processContainer(container, currentTime)); | ||
| recordSingleRunCompletion(); | ||
| LOG.info("Missing Container task Thread took {} milliseconds for" + |
There was a problem hiding this comment.
| LOG.info("Missing Container task Thread took {} milliseconds for" + | |
| LOG.info("Container Health task thread took {} milliseconds for" + |
There was a problem hiding this comment.
Well spotted. I have fixed this.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| * already set to. We only need to run a DB update statement if the record | ||
| * has really changed. The methods below ensure we do not update the Jooq | ||
| * record unless the values have changed and hence save a DB execution | ||
| * when |
There was a problem hiding this comment.
Please fix the dangling statement
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
avijayanhwx
commented
Jun 3, 2020
Thank you @sodonnel. LGTM +1 |
…er and mis-replicated containers. (apache#994)
What changes were proposed in this pull request?
The current Recon "Missing Containers Task" only highlights missing containers in the cluster.
It is desired for it to also detect under, over and mis-replicated containers.
In order to do that, the existing database table MISSING_CONTAINERS has been renamed to UNHEALTHY_CONTAINERS, with the definition:
The container state can be MISSING, UNDER_REPLICATED, OVER_REPLICATED or MIS_REPLICATED.
A design decision was made so that if a container is MISSING, then it is not in any of the other states.
However, it can be both under and mis-replicated or in theory over and mis-replicated at the same time and this would result in two rows in the database for a single container.
Each time the "Container Health task" runs, it scans all the existing records, updates any counts and removes any records that are no longer valid.
Then it processes all other containers without any records in the unhealthy_containters table.
The reason the job is split into two parts, is to avoid the need to query the database for every single container on each run.
This change only adjusts the job and the backend storage. An additional change is needed to change the rest endpoints to expose the new container states to the users and UI.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-3082
How was this patch tested?
New and existing unit tests