-
Annamalai Gurusami authored
Problem: If the first page (page 0) of the single table tablespace is corrupted in the data file then our recovery doesn't progress even if there is a clean copy of the same available in the double write buffer. Analysis: During recovery, our first step is to process the double write buffer. We look at the pages in the double write buffer and determine its (space_id, page_no) details. Each of the page in the double write buffer corresponds to a page in the .ibd data file. Using the space_id information we need to map the page in the double write buffer to the corresponding ibd file. This is done by reading the space_id information from the first page of the single table tablespace. If the first page of the single table tablespace is corrupted, then we are unable to determine the data file to which a particular page in the double write buffer belongs to. So we need to explore and see if we can determine the space_id in other means. Solution: Assume a particular page size. Read N number of pages from the ibd file. Ignore the corrupted pages and determine the (space_id, page_size and zip_size) information. Repeat this for all supported page sizes. Using this approach determine the correct (space_id, page_size and zip_size) of the ibd file. rb#4025 approved by Yasufumi.
Annamalai Gurusami authoredProblem: If the first page (page 0) of the single table tablespace is corrupted in the data file then our recovery doesn't progress even if there is a clean copy of the same available in the double write buffer. Analysis: During recovery, our first step is to process the double write buffer. We look at the pages in the double write buffer and determine its (space_id, page_no) details. Each of the page in the double write buffer corresponds to a page in the .ibd data file. Using the space_id information we need to map the page in the double write buffer to the corresponding ibd file. This is done by reading the space_id information from the first page of the single table tablespace. If the first page of the single table tablespace is corrupted, then we are unable to determine the data file to which a particular page in the double write buffer belongs to. So we need to explore and see if we can determine the space_id in other means. Solution: Assume a particular page size. Read N number of pages from the ibd file. Ignore the corrupted pages and determine the (space_id, page_size and zip_size) information. Repeat this for all supported page sizes. Using this approach determine the correct (space_id, page_size and zip_size) of the ibd file. rb#4025 approved by Yasufumi.
Loading