Error page NNN is of wrong type (expected 7, found N) [CORE2684] #3087
Labels
affect-version: 1.5.4
affect-version: 1.5.5
affect-version: 1.5.6
affect-version: 2.0.0
affect-version: 2.0.1
affect-version: 2.0.2
affect-version: 2.0.3
affect-version: 2.0.4
affect-version: 2.0.5
affect-version: 2.1.0
affect-version: 2.1.1
affect-version: 2.1.2
affect-version: 2.1.3
affect-version: 2.5 Alpha 1
affect-version: 2.5 Beta 1
affect-version: 2.5 Beta 2
component: engine
fix-version: 2.0.6
fix-version: 2.1.4
fix-version: 2.5 RC1
fix-version: 3.0 Alpha 1
priority: major
qa: not enough information
type: bug
Submitted by: @hvlad
BTR\garbage_collect() fetched parent, left, gc and right pages to do its job.
Parent page number is passed into garbage_collect() as parameter and this page is fetched as pag_undefined with verification after the fetch that it is still belongs to the index.
Left page number was stored in variable while gc_page was locked. When left page is fetched it is assumed that its is still index page but this is wrong assumption.
At this point we can have "wrong page type" error.
Solution is to fetch left page the same way as parent page - as pag_undefined with verification it is still belongs to the index.
gc_page and right pages fetched as pag_index pages and it is safe as page numbers got from the currently locked left and gc_page accordingly.
Commits: d7f1301 e3eaa90 2c59722 19e817c
The text was updated successfully, but these errors were encountered: