php-mysql-replication icon indicating copy to clipboard operation
php-mysql-replication copied to clipboard

Rare race condition suspected

Open quakemmo opened this issue 3 years ago • 1 comments

Please provide the following details.

OS: Linux Debian 12 PHP: 8.1 php-mysql-replication: 7.0.1 8.0.27 - Oracle MYSQL

On a rare occasion, maybe once every 1000 times, an INSERT event will be triggered by php-mysql-replication, but an immediate SELECT query on the unique ID (passed in the insert values) will return no rows. The same SELECT query will return a row if subsequently entered manually.

Is the INSERT event first sent to the binlog and THEN to the actual MySQL engine? It feels like there's a race condition there.

Transactions are not used in this particular scenario.

quakemmo avatar Mar 20 '22 08:03 quakemmo

hi, can you replicate this using some code example ?

krowinski avatar Jan 30 '24 15:01 krowinski