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
_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to