[sr-dev] db_cassandra - db_cassa_raw_query & INSERT query

jay binks jaybinks at gmail.com
Wed Mar 12 08:53:47 CET 2014


If doing a query that returns no results ( Insert etc )
db_cassa_raw_query would cause these ERRORS to be logged

0(22283) ERROR: db_cassandra [dbcassa_base.cpp:739]: db_cassa_raw_query():
The resultype rows was not set, no point trying to parse result.
0(22283) ERROR: avpops [avpops_db.c:333]: db_query_avp(): cannot do the
query

db_cassa_raw_query would also return -1 as a failure code which caused
avpops_db to log the query failure.

my patch changes the db_cassa_raw_query log message to debug level, and
returns success from the function.

I had a quick look to see if there was an elegant way to determine if we
should expect results, so we can vary the response code based on query
type, but I was unable to find anything other than doing string comparisons
on the query, so I opted to not bother with this as it would be erroneous.

Please find attached patch.

-- 
Sincerely

Jay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20140312/f0c37e34/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: netsip_db_cassandra_rawquery.patch
Type: application/octet-stream
Size: 754 bytes
Desc: not available
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20140312/f0c37e34/attachment.obj>


More information about the sr-dev mailing list