Kahadb – Transaction load


Loading a Page

When a page is requested, instead of reading it from disk, it is first looked into the cache. There are three different caches and below shows the order in which the page is looked up.

  1. It might be a page that the current transaction has modified so it will first try to get it from its own page updates cache.
  2. If it is not available in transaction’s page updates, it will try to get it from PageFile’s page updates cache.
  3. If it is not found there, it will try to get it from PageFile’s page cache.
  4. It it is not found in the cache then the page will be read from disk. The marshaller is responsible to read the full page. One may also read a page with just its header. The read page will be added to page cache.

Below call loads the page with just its headers.

page = tx.load(page.getPageId(), null);

If we pass the marshaller, it will read the full page.

page = tx.load(page.getPageId(), marshaller);

Kahadb - Transaction load
The page cache used in PageFile is either a LFU or LRU cache and is configurable.


Leave A Reply