Comment 10 for bug 944422

Revision history for this message
nbrnhardt (nb-k) wrote :

There is really something going wrong when Maria table logs aren't identical to what they are expected to be. So this is not limited to an uprade, I think.

Following scenario to set up / sync new slave servers (5.2.10):
- stop master
- delete the log files (that is, we have a lot of aria_xxx files)
- copy the data dir to the slaves
- restart master, and start the slaves servers.

On the MASTER following happens:
As soon as the first user uses a a table, MariaDB seems to notice some differences (between table and (non-existing) log?), and issues in the error log:
120327 7:04:52 [Note] Zerofilling moved table: '.\dbv\belegliste'
120327 7:04:54 [Warning] Checking table: '.\dbv\belegliste'

Not only limited to this table, but here it does so here hundreds of times during the next hour.
Then the server got restarted and an REPAIR TABLE belegliste was issued:
120327 8:10:23 [Warning] Checking table: '.\dbv\belegliste'
120327 8:10:23 [Warning] Recovering table: '.\dbv\belegliste'
120327 8:10:23 [Note] Retrying repair of: '.\dbv\belegliste' with keycache
120327 8:10:23 [ERROR] Couldn't repair table: dbv.belegliste

After another restart, the error log tells:
120327 8:11:10 [ERROR] MySQL: Table '.\dbv\belegliste' is marked as crashed and last (automatic?) repair failed

On another REPAIR TABLE, the result is:
120327 8:11:37 [Note] Found 6004 of 0 rows when repairing '.\dbv\belegliste'

After issuing a REPAIR TABLE to all Maria tables, the database is working fine again.

On the SLAVE, `belegliste` gives a "Got error: 176 when reading datafile". Couldn't find anything on Google.

It seems that on a read or write of a MariaDB table, the database server compares the table to the log file that isn't there anymore. Is there any sort of counter that tells MariaDB that a table is 'corrupt'? More specificly, is there a counter stored in the table to sync the position of the log files? If the log files change or get deleted, this counter should automatically re-synced with the new logs.

Any ideas?

If you need the table `belegliste`, I would upload it on FTP.