Following is the further analysis:
1. Data count is obtained from a DB table using select count( * ) query. This returns a long value. We fetch this value as getLong(1). We cannot change this. This seems oracle format
2. This value is then converted to double value in our plugin code. Here it is converted to exponential form.
3. This value is passed to RHQ Agent api. Value remains preserved but in exponential form
4. This value is finally passed to RHQ server
5. Now, here I see the problem.
a. There are RHQ tables that store values of measurement data. With names like RHQ_MEAS_DATA_NUM_....
b. Now the datatype of the column used to store value in these tables is FLOAT.
c. This might be corrupting the values because double values in exponential form are stored in a column with Float as datatype.
If the format of RHQ tables in latest version of RHQ remains same then this problem will exist.
Did anyone face this issue? Can anyone confirm if same problem exist in latest versions? Is there any way to handle this?
1 of 1 people found this helpful
while RHQ 3.0.0 is VERY old (we're close to releasing 4.8.0) this seems like a very serious issue. I am not sure if in your case a conversion long -> double -> float should cause any problems - the number in question is well within the range of all of them and even float should be able to handle that precision with no problems. That said, the type of the "value" column SHOULD be a DOUBLE on both Postgres and Oracle.
I am more inclined to think that we might be (or might have been) doing some kind of rounding before the values are stored into the DB.
In RHQ 4.8.0 we've completely revamped the metric storage for which we've started to use Cassandra cluster. That might or might not mean that your problem (if it existed in RHQ 4.x) might disappear
In any case, since this looks quite serious, I would like to ask you to report this issue as a bug in our bugzilla here. It would be even better if you tried to reproduce your issue with RHQ 4.7.0 or even 4.8.0 once it gets out.
Thanks for reporting this,
Thanks Lukas for the reply. I will test the issue on RHQ 4.7 and report it as a bug if not solved on RHQ 4.7.
When can we expect the release of RHQ 4.8, any idea?
The release of RHQ 4.8.0 is imminent. We hope to have it out within the next day or two. Please stay tuned for the release announcement.