-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Ticker and Histogram enumeration types out of sync with Java API #2171
Comments
Yes. Since we are short of ppl maintaining Java api, would you like to contribute? |
@adamretter I was facing same issue. In this case I would recommend to use portable (maybe slower) way (strings over numbers). I made a change in this way in our local repo using TickersNameMap. It works perfectly and does not require to maintain the enumerations at all. What do you think? |
@koldat Is it possible to see an example? |
@adamretter Roughly like this:
And enumeration can reference strings. For missing enum one can still use string without library change. |
@koldat Sorry I can't understand what you mean from the above code, I don't see any enums involved there. |
@adamretter That is actual usage. Enum can be:
There are more use cases:
|
@adamretter What do you think? Should I go ahead and create pull request? |
Closing this via automation due to lack of activity. If discussion is still needed here, please re-open or create a new/updated issue. |
Problem: The enumerations of tickers and histogram types for retrieving statistics are not in sync between the C++ source and the java API:
Java version:
https:/facebook/rocksdb/blob/master/java/src/main/java/org/rocksdb/TickerType.java
https:/facebook/rocksdb/blob/master/java/src/main/java/org/rocksdb/HistogramType.java
C++ version:
https:/facebook/rocksdb/blob/master/include/rocksdb/statistics.h
The java Enumeration is missing a lot of declarations, and their values do not correspond to the (implicit) order of values in the C++ enum.
Impact: for example, retrieving the
BLOOM_FILTER_USEFUL
statistic through the java API, actually returns the data forBLOCK_CACHE_FILTER_MISS
.The text was updated successfully, but these errors were encountered: