[MDEV-7829] Could not execute Update_rows_v1 event on table mysql.table_stats; Can't find record in 'table_stats' Created: 2015-03-25 Updated: 2015-04-15 Due: 2015-04-25 Resolved: 2015-04-15 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Replication |
| Affects Version/s: | 10.0.17 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Daniel Black | Assignee: | Unassigned |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | parallelslave, replication | ||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
master:
slave:
inspired by the will to work around |
| Comments |
| Comment by Daniel Black [ 2015-03-25 ] | |||
|
no problems with statement based
| |||
| Comment by Elena Stepanova [ 2015-03-25 ] | |||
|
This is actually expected. Persistent statistic updates are not replicated (and cannot be, really); so the contents of the tables can easily be different. If you update the table directly, which you normally shouldn't, and if you aren't careful enough to set sql_log_bin to 0 while doing that, bad things will happen. | |||
| Comment by Daniel Black [ 2015-03-25 ] | |||
|
While the replication on persistent statistics makes the assumption that the data is the same on the slaves, which is the goal for many replication architectures, I'm generally willing to take that risk compared to the consequence of a replicating analyze table blocking writes to tables for what can be 30mins+ for big tables and using a far amount of IO in the meantime. Is there another consequence to direct manipulation that I'm missing? Would having engine independent stats table as engine=innodb with STATS_PERSISTENT=0 like innodb_index_stats/innodb_table_stats help?
Perhaps this should be a feature request for ANALYZE RESULTS_TO_BINLOG TABLE .... Is that more palatable? | |||
| Comment by Elena Stepanova [ 2015-03-25 ] | |||
|
Well, there are lots of consequences of replicating updates to persistent stats. First, a slave might be not MariaDB 10.0/10.1. It can be for example MySQL 5.6 – while it's not our main focus to maintain downgrade/crossgrade replication, we wouldn't want to break it without a good reason. Of course, all arguments concern certain different replication setups. If you talk about an idealistic one – replication is strictly between the same versions or up; you always use the same binlog format; you don't do any writes on slave and the data is exactly the same; settings (statistics-wise) are exactly the same – then yes, the current implementation is definitely not optimal. Unfortunately, we can't support ideal scenarios only. If you can think of a solution which will improve the current approach without breaking various scenarios we need to support, you are more than welcome to request the feature... or even implement it and submit a patch | |||
| Comment by Elena Stepanova [ 2015-04-15 ] | |||
|
According to the comment above, closing as "not a bug" for now. |