Bug #42392 Falcon bugs in recovery of create tablespace
Submitted: 27 Jan 2009 19:37 Modified: 15 May 2009 13:02
Reporter: Vladislav Vaintroub Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Falcon storage engine Severity:S3 (Non-critical)
Version:6.0.10-bzr OS:Any
Assigned to: Vladislav Vaintroub CPU Architecture:Any

[27 Jan 2009 19:37] Vladislav Vaintroub
There are several bugs in create tablespace that prevent it from successfull recovery.

- the creation of PageInventoryPage is now logged (fix for Bug#42060) and replayed on recovery. Recovery recreates the PIP and it is empty. When tablespace is created, it should not be empty, since some hard-coded page numbers (0-3) are already used for special pages (header, page inventory page, section root,index root). If PIP (page 1) is empty, reserved page numbers can easily be taken by another allocations, which results into errors like
(page 1/1 wrong page type, expected 8 got 9 - here PIP page is taken by data page)

- when create tablespace is redone on recovery, DB should be reinited , which means special pages (header, pip, section and index root) should to be recreated so tablespace is empty. This will help avoid loosing disk space due to partially occupied PIP

How to repeat:
pushbuild2 falcon_blob_recovery test

Suggested fix:
- do not log the first PIP ( page number 1 == PIP_PAGE)
- do recreate special pages when replaying "create tablespace"
[27 Jan 2009 20:45] 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:


2977 Vladislav Vaintroub	2009-01-27
      Bug#42392: Falcon bugs in recovery of create tablespace
      Problem: during recovery of workload that does "create tablespace",
      falcon  would assert with the message "page 1/1 wrong page type, 
      expected 8 got N (where N != 8)
      Reason for the error is recent fix for Bug42060, that introduces 
      logging for page inventory pages. PIP page #1 needs special 
      handling that is missing in the above mentioned bug fix. Unlike 
      other PIP pages, this one is created during "create tablespace" 
      and should already have first 4 pages marked as allocated
      (for special falcon pages header, pip, section and index roots 
      that have numbers 1-3). Recovery did not mark those pages as
      allocated and they were taken away by some other page types.
      Don't log PIP if its page number is 1. Instead, recreate PIP and
      other special pages during recovery of "create tablespace".
      This patch also contains fix for Bug#42392 - removing 
      unnecessary TableSpace::open() from TableSpaceManager::bootstrap()
[13 Feb 2009 7:24] Bugs System
Pushed into 6.0.10-alpha (revid:alik@sun.com-20090211182317-uagkyj01fk30p1f8) (version source revid:vvaintroub@mysql.com-20090127204430-xg5rnbm5mp35dzf4) (merge vers: 6.0.10-alpha) (pib:6)
[15 May 2009 13:02] MC Brown
An entry has been added to the 6.0.10 changelog: 

The recovery of Falcon tablespaces could fail because the tablespace information had become corrupt.