-
Notifications
You must be signed in to change notification settings - Fork 588
HDDS-2364. Add OM metrics to find the false positive rate for the keyMayExist. #101
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
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/utils/db/RDBMetrics.java
Show resolved
Hide resolved
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/utils/db/RDBTable.java
Outdated
Show resolved
Hide resolved
|
In this PR, my next commit will fix an issue in the isExist implementation, as discussed in #102 (review). |
|
cc @anuengineer |
bharatviswa504
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.
+1 LGTM.
I will wait for @anuengineer review, as @anuengineer has asked for few changes in keyMayExist logic.
anuengineer
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.
+1. LGTM.
| StringBuilder outValue = new StringBuilder(); | ||
| boolean keyMayExist = db.keyMayExist(handle, key, outValue); | ||
| if (keyMayExist) { | ||
| boolean keyExists = (outValue.length() > 0) || |
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.
Could you explain that why you need the addition condition to judge the value of keyMayExist? @avijayanhwx
What changes were proposed in this pull request?
Added metrics for tracking the RocksDB keyMayExist miss rate. Fixed an issue in the Table.isExist() API such that we look at the out bound parameter that we pass in to rockdb.keyMayExist() before making a rockdb.get() call. The keyMayExist API usage was added in apache/hadoop#1013.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-2364
How was this patch tested?
Unit tested.
Tested manually on cluster by looking at OzoneManager JMX endpoint.