0

I'm considering MariaDB master-master configuration for a webapp database.

My application has some index locking, something like:

SELECT COUNT(*) FROM person WHERE event=? FOR UPDATE;

The transaction checks the subscribers amount to an event and finally insert the new person only if the capacity is not reached, and then the lock is released with the COMMIT command.

I was wondering what happened if I enabled the master-master replica to two servers, for a first test is looks like the lock is completely ignored.

Do you please confirm index/table lock is not working with this configuration? How usualy is resolved thing kind of problem when someone needs a multi-dbserver environment?

Tobia
  • 9,165
  • 28
  • 114
  • 219

0 Answers0