Physical pagesPage edited by Emmanuel LécharnyChanges (1)
Full ContentThe RecordManager stores all the Btrees in one single file, which is split in many physical pages, all having the same size.
If we except a small header at the beginning of the file, everything is stored in PageIO in the file. PageIOa PageIO contains some raw data. As we have to map some logical data that may be wider than a physical fixed size PageIO, we link the PageIO so that they contain all the data contained in a logical page. Each PageIO has a hight byte pointer at the beginning, plus an extra 4 bytes on the first PageIO to define the number of bytes stored. Here is the mapping between a logical page and some PageIO : Every PageIO are contiguous on disk. RecordManager headerWe keep a few bytes at the beginning of the file to store some critical information about the RecordManager Here is the list of stored informations :
Here is a picture that shows the header content : Unable to render embedded object: File (RMHeader.png) not found. We keep a track of the free pages (a free page is a PageIO that is not anymore used, for instance because the data have been deleted.) This is done by keeping a link between each PageIO and by pointing to the first feee PageIO and to the last free PageIO At startup, of course, we have no free pages, and those pointers contain the -1 offset. The internal structureThe RecordManager manages BTrees, and we have to store them into PageIOs. How do we do that ? All the BTrees have a header that contains many informations about them, and point to a rootPage which is the current root (so the root for the latest revision). As a RecordManager can manage more than one BTree, we have to find a way to retreive all the BTrees at startup : we use an internal link, so that a btree points to the next btree. At startup, we read the first BTree which is stored in the first PageIO in the file (so just after the RecordManager header), then we read the next btree pointed by the first btree, and so on. The BTree headerThe rootPageThe rootPage is a serialized BTree Page, it maybe stored in one or more PageIOs.
Change Notification Preferences
View Online
|
View Changes
|
Add Comment
|
- [CONF] Apache Labs > Physical pages confluence
- [CONF] Apache Labs > Physical pages confluence
- [CONF] Apache Labs > Physical pages confluence
- [CONF] Apache Labs > Physical pages confluence
- [CONF] Apache Labs > Physical pages confluence
- [CONF] Apache Labs > Physical pages confluence
- [CONF] Apache Labs > Physical pages confluence
- [CONF] Apache Labs > Physical pages confluence
- [CONF] Apache Labs > Physical pages confluence
- [CONF] Apache Labs > Physical pages confluence
- [CONF] Apache Labs > Physical pages confluence
- [CONF] Apache Labs > Physical pages confluence
- [CONF] Apache Labs > Physical pages confluence
- [CONF] Apache Labs > Physical pages confluence
- [CONF] Apache Labs > Physical pages confluence
