The immediate value is the have a way to distinguish and ignore insert failures
when they are caused by by a constraint violation.
The first use case would be in usrloc when we write to db and use dmq
replication.
I would add a param to usrloc module "db_insert_update" defaulting to 0 but
that could be set to 1, shit would already work completely with mysql
However with postgres, it would remove any unwanted errors and retries when
syncing from dmq for example, I saw other posts about such errors.
This way usrloc would only retry it there is a real failure not a constraint
violation.
Then we could plan for a second step to implement the "DO UPDATE" instead of
just "DO NOTHING"
- add an optional param to insert_update (modify the db framework slightly) to
specify the name of the constraint where we want to update on failure
- add a db_postgres module variables that could contain tablename_constraint
and check for them when doing insert update
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1039#issuecomment-287866358
_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev