On 03/27/2012 03:44 PM, Daniel-Constantin Mierla wrote:
Module: sip-router
Branch: master
Commit: 201fc2d600e48fbb717531c79013c1b971f82d76
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=201fc2d…
Author: Daniel-Constantin Mierla<miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla<miconda(a)gmail.com>
Date: Tue Mar 27 14:38:57 2012 +0200
Hello Daniel,
I have a few questions regarding the db_cluster module and especially
the way it deals with errors:
For serial operation , lets consider two handlers DB1 and DB2 with the
same priority. For the first write operation DB1 lets presume that
itfails so the insert is done on DB2 (network congestion, mysql deadlock
etc). But for a serial select the first DB1 is chosen (I looked thru the
code and I see no ways of caching the initial error) and this means that
the info returned from DB1 (it might be insert_update or update so info
might be also present in DB1). How does the module handle this?
Same scenarios and question I think it applies with round-robin mode as
well.
The way we do this in p_usrloc is by keeping a error counter per each
handler that is associated with a state (on -off) and a timestamp (when
it failed). This info can be used to disable usage of the DB handler(
and later put the handler in Write-Only mode until the data is
synchronized )
Cheers,
Marius
Zbihlei Marius
Head of
Linux Development Services Romania
1&1 Internet Development srl Tel KA: 754-9152
Str Mircea Eliade 18 Tel RO: +40-31-223-9152
Sect 1, Bucuresti mailto: marius.zbihlei(a)1and1.ro
71295, Romania