[MDEV-6276] Replicate_Do_DB option causes slave server to commit empty InnoDB transactions. Created: 2014-05-28 Updated: 2022-09-12 Resolved: 2022-09-12 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | OTHER |
| Affects Version/s: | 10.0.11 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Bill Rios | Assignee: | Kristian Nielsen |
| Resolution: | Won't Fix | Votes: | 1 |
| Labels: | regression, replication | ||
| Environment: |
RHEL 6.4 |
||
| Description |
|
Hi, I'm using the Replicate_Do_DB option to replicate a DB with a very small amount of activity (less then one transaction per second). Another DB running on the master server runs many more transactions per second. In the output of 'show full processlist' on the slave, I can see the slave process constantly switching between COMMIT and 'closing tables' for the DB that should be excluded by the Replicate_Do_DB option. I did not have this issue when using MariaDB 5.5.27. I enabled the general query log and it shows BEGIN and COMMIT repeatedly but no queries that actually alter any tables: 140527 12:13:35 1721 Query BEGIN This generates a lot of I/O contention that I've had to mitigate on this development server by setting innodb_flush_log_at_trx_commit to 0. I wouldn't be comfortable with that setting on a production DB server though. Regards, |
| Comments |
| Comment by Kristian Nielsen [ 2014-06-10 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I verified this bug with the following test case:
In the output of this test case, we can see this:
So the problem is that for the empty transaction, even though there are no It might have been deliberate to update the gtid_slave_pos, the idea being But in any case, I think this bug clearly shows that such behaviour is So this needs to be fixed, I think. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Kristian Nielsen [ 2014-06-12 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hm, there is a potential problem with not updating the GTID state for events If a lot of events are ignored (perhaps within a specific domain only), the The slave does not need any of the events that the master has purged, but the One way to handle this might be to update the table only occasinally. For But it might be somewhat confusing to users that the current gtid position Another approach might be to update the in-memory @@gtid_slave_pos for every | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Kristian Nielsen [ 2014-06-12 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Maybe we could make a general facility to not update the mysql.gtid_slave_pos Then it could be configured to to eg. update all event groups crash safe, Then when a GTID is not to be recorded crash-safe, we can record it only in And we will also update whenever a slave thread stops, so that in the no-crash This could then be configurable by the DBA, which could also help reduce the | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2022-09-12 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
10.0 was EOLed in March 2019 |