> Because the replication in MySQL is asynchron, you as DB-admin has to
> make sure that the DB components (Master & Slave) get rid of duplicate
> keys. How ever, assp checks before writing a record if it has to do an
> 'UPDATE' or an 'INSERT'. An UPDATE makes no problem, because the
> record is locked. An INSERT could fail, if the SLAVE writes the same
> record just in the moment between the existency check and the record
> write of assp.
sorry for jumping in barefoot but...
let's say that each record has a unique key (e.g. an MD5 calculated on
some "peculiar" infos); at that point it would be quite easy to solve
such
a conflict, I mean, the ASSP code may do something like (pseudocode)
error = SQLexec( "INSERT INTO table VALUES(.....)");
if (SQL_DUP_KEY == error) {
error = SQLexec("UPDATE table SET .... WHERE ...");
}
if (SQL_NO_ERROR != error) {
// log the error do whatever needed
}
or... am I missing something ?
------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Assp-test mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/assp-test