qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fraser Adams <fraser.ad...@blueyonder.co.uk>
Subject ManagementAgent query response for _object_id not setting _update_ts, _create_ts and _delete_ts
Date Sun, 20 Jan 2013 10:13:26 GMT
Hi All
I've just noticed this during some testing of my QMF REST API, so I've 
been going a getObjects call with an ObjectId as a parameter which 
should return the most recent state of that object.

More precisely I first did getObjects("broker") to retrieve the broker 
objects and having got the _object_id from that I used that as the 
parameter to getObjects() to prove things were getting correctly updated.

What I noticed was that my _update_ts, _create_ts and _delete_ts all get 
updated in the response and they are all the same value.

As it happens (for better or for worse) my QMF API QmfConsoleData 
constructor sets these three timestamps to the current time if the 
properties aren't present in the response and it looks like it's doing 
that because I've used

         long currentTime = System.currentTimeMillis()*1000000l;

which has a lower resolution than the nanosecond resolution sent in the 
getObjects("broker") response.

However as I say when I do getObjects("broker") the timestamps in the 
response are correct and that part of the code is identical irrespective 
of whether I do an _object_id or __schema_id query so I'm fairly sure 
it's not something stupid I'm doing...... (famous last words :-)).

I've taken a look in ManagementAgent.cpp the code involved is in:

void ManagementAgent::handleGetQueryLH(const string& body, const string& 
rte, const string& rtk, const string& cid, bool viaLocal)

what I've noticed is that although the block following "i = 
inMap.find("_object_id");" does do

             if (object->getConfigChanged() || object->getInstChanged())

which would seem to indicate that the update time at least should be OK, 
however for the class based result I noticed:

                     if (object->getConfigChanged() || 


The "object->writeTimestamps(map_);" being the interesting bit and  
missing from the _object_id call.

I've got a hunch about this. I *suspect* that the 
"object->setUpdateTime();" call actually relates to the QMF1 binary 
protocol timestamp setting but the "object->writeTimestamps(map_);" 
relates to the QMF2 Map Message protocol.

So I've fairly sure that this is a bug/omission. I've only looked at 
Qpid 0.12 as I'm stuck on that at the moment, so it may have been fixed, 
but it's a bit "down in the noise" on a fairly uncommon call, so I 
suspect I may be quite unusual actually calling that block :-)

If you agree that it looks like a bug let me know and I'll raise a Jira.


To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org

View raw message