arp7 commented on a change in pull request #1164: HDDS-1829 On OM reload/restart OmMetrics#numKeys should be updated URL: https://github.com/apache/hadoop/pull/1164#discussion_r307539625
########## File path: hadoop-hdds/common/src/main/java/org/apache/hadoop/utils/db/RDBTable.java ########## @@ -183,4 +183,14 @@ public String getName() throws IOException { public void close() throws Exception { // Nothing do for a Column Family. } + + @Override + public long getEstimatedKeyCount() throws IOException { + try { + return db.getLongProperty(handle, "rocksdb.estimate-num-keys"); + } catch (RocksDBException e) { + throw new IOException( + "Failed to get estimated key count of table."); Review comment: If we throw an exception here, Ratis will get a failure via the future returned from `notifyInstallSnapshotFromLeader`. I am not sure what the impact of that is. Will Ratis terminate the process? cc @hanishakoneru I'd say for now this is okay. I filed https://issues.apache.org/jira/browse/HDDS-1862 to investigate further. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org