[sr-dev] [kamailio] event on table location Duplicate entry for key 'ruid_idx' (#30)
Daniel-Constantin Mierla
notifications at github.com
Fri Nov 27 12:31:44 CET 2015
I think this is not easy to track as long as the MySQL made the insert but the client reports an error for doing the insert. So mysql client says the insert didn't succeed, but the mysql server actually did it.
There can be added some self healing approaches:
* 1)add a timer function to delete expired records from database, so this situation will stay there only for the duration of one registration interval
* 2) if insert fails, try to figure out if the driver reports a duplicate key, if yes, then do a query and load the record from db with same ruid and if other attributes matches the structure in memory, then either remove it from db (maybe it has some too old details, then next insert should succeed) or set the structure in memory to do update next time
* 3) if insert in db fails, try to do a remove from db at that time
What I wanted to figure out is whether the unique id generation used for ruid can result in duplication, which should not happen by its algorithm and it is not the reason for the reported issue here. In other words, you don't report here that Kamailio generates same ruid value for different location records.
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/30#issuecomment-160119895
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20151127/6fe10d18/attachment-0001.html>
More information about the sr-dev
mailing list