You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "sadanand48 (via GitHub)" <gi...@apache.org> on 2024/01/10 08:36:38 UTC

[PR] HDDS-10094. OM start failure due to failure to parse OM metrics file. [ozone]

sadanand48 opened a new pull request, #5971:
URL: https://github.com/apache/ozone/pull/5971

   ## What changes were proposed in this pull request?
   Add exception handling around failure to read the omMetrics file .
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-10094
   
   ## How was this patch tested?
   Manual fix


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-10094. OM start failure due to failure to parse OM metrics file. [ozone]

Posted by "errose28 (via GitHub)" <gi...@apache.org>.
errose28 commented on PR #5971:
URL: https://github.com/apache/ozone/pull/5971#issuecomment-1885928139

   Thanks for looking at this issue @sadanand48. @dombizita and I were actually discussing this area and I have summarized our thoughts in HDDS-10110. Basically I think we should get rid of the OM metrics file and use the RocksDB key count estimates to maintain estimates of these metrics between restarts.


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-10094. OM start failure due to failure to parse OM metrics file. [ozone]

Posted by "aryangupta1998 (via GitHub)" <gi...@apache.org>.
aryangupta1998 commented on code in PR #5971:
URL: https://github.com/apache/ozone/pull/5971#discussion_r1447743417


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -1655,8 +1655,18 @@ public void start() throws IOException {
         .getBucketTable()));
 
     if (getMetricsStorageFile().exists()) {
-      OmMetricsInfo metricsInfo = READER.readValue(getMetricsStorageFile());
-      metrics.setNumKeys(metricsInfo.getNumKeys());
+      OmMetricsInfo metricsInfo = null;
+      try {
+        metricsInfo = READER.readValue(getMetricsStorageFile());
+      } catch (Exception e) {
+        LOG.error("Failure to parse OM Metrics File", e);
+      }
+      if (metricsInfo != null) {
+        metrics.setNumKeys(metricsInfo.getNumKeys());
+      } else {
+        metrics.setNumKeys(metadataManager.countEstimatedRowsInTable(
+            metadataManager.getKeyTable(BucketLayout.LEGACY)));

Review Comment:
   Can we have `getBucketLayout()` instead of passing `BucketLayout.LEGACY`?



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-10094. OM start failure due to failure to parse OM metrics file. [ozone]

Posted by "errose28 (via GitHub)" <gi...@apache.org>.
errose28 commented on PR #5971:
URL: https://github.com/apache/ozone/pull/5971#issuecomment-1888179680

   I have a draft PR of the above proposal in #5988 


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-10094. OM start failure due to failure to parse OM metrics file. [ozone]

Posted by "sadanand48 (via GitHub)" <gi...@apache.org>.
sadanand48 commented on PR #5971:
URL: https://github.com/apache/ozone/pull/5971#issuecomment-1896351998

   Thanks @errose28 for letting me know, I will close this PR in that case.


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-10094. OM start failure due to failure to parse OM metrics file. [ozone]

Posted by "sadanand48 (via GitHub)" <gi...@apache.org>.
sadanand48 closed pull request #5971: HDDS-10094. OM start failure due to failure to parse OM metrics file.
URL: https://github.com/apache/ozone/pull/5971


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org