Bug #41837 | Falcon recovery error: page 102/0 wrong page type, expected 7 got 0 | ||
---|---|---|---|
Submitted: | 3 Jan 2009 12:34 | Modified: | 15 May 2009 15:59 |
Reporter: | Philip Stoev | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Falcon storage engine | Severity: | S1 (Critical) |
Version: | 6.0-falcon-team | OS: | Any |
Assigned to: | Vladislav Vaintroub | CPU Architecture: | Any |
Tags: | F_RECOVERY, Tablespace |
[3 Jan 2009 12:34]
Philip Stoev
[18 Feb 2009 17:42]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/66783 3026 Vladislav Vaintroub 2009-02-18 Bug #42745 Exception: can't find table space during recovery Bug #41837 Falcon recovery error: page 102/0 wrong page type, expected 7 got 0 Problem: Falcon internal table system.tablespaces can be inconsistent when mysqld has crashed or was killed. This table (possibly inconsistent) was previously read on Falcon startup in TableSpaceManager::bootstrap(), to provide recovery with enough information to associate tablespace IDs in log records with actual tablespace files. But since the table is possibly outdated information, it was still possible to have lost tablespaceid without any correspond file. Recovery will stop then. Another problem with TableSpace::bootstrap() is attempt to read behind the end of falcon_master.fts. Typically it would be a page present referenced in a section page, and referenced page was not yet flushed to disk at the moment of crash(Bug#41837) Solution: Avoid reading system.tablespaces from disk whenever possible. Instead, when a new tablespace is added or some tablespace is deleted, current state (listof all existing tablespaces) is written to serial log in SRLTableSpaces record. If recovery finds SRLTableSpaces during the first pass, last SRLTableSpaces record is used to reconstruct the before-crash state. If recovery does not find SRLTableSpaces, it will still read system.table spaces with TableSpaceManager::bootstrap() as before. However reading from disk is safe, because tablespaces were not modified since the last checkpoint. added: storage/falcon/SRLTableSpaces.cpp storage/falcon/SRLTableSpaces.h modified: storage/falcon/CMakeLists.txt storage/falcon/Database.cpp storage/falcon/Makefile.am storage/falcon/SRLVersion.h storage/falcon/SerialLog.cpp storage/falcon/SerialLogControl.cpp storage/falcon/SerialLogControl.h storage/falcon/SerialLogRecord.h storage/falcon/TableSpaceManager.cpp storage/falcon/TableSpaceManager.h
[18 Feb 2009 22:23]
Kevin Lewis
Code reviewed by Kevin Lewis and Jim Starkey
[2 Mar 2009 14:12]
Bugs System
Pushed into 6.0.11-alpha (revid:alik@sun.com-20090302140208-lfdejjbcyezlhhjt) (version source revid:vvaintroub@mysql.com-20090218174140-unfccjescdawur5g) (merge vers: 6.0.10-alpha) (pib:6)
[15 May 2009 15:59]
MC Brown
An entry has been added to the 6.0.11 changelog: Recovery of Falcon tables could fail with an indicating that a wrong page type was identified in the Falcon serial log.