Skip to content

remove dirty page hash map in BtreeFile.java #22

@leiwingqueen

Description

@leiwingqueen

As mention in lab5.md, we use dirty pages cache to mark if the page dirty.

BTreeFile.getPage() also adds pages to the dirtypages cache if they are fetched with read-write permission, since presumably they will soon be dirtied. One advantage of this approach is that it prevents loss of updates if the same pages are accessed multiple times during a single tuple insertion or deletion.

this solution will come up some problem. if we need to evict some page to get some page from disk, we can find some pages are not dirty but they actually in dirty page cache. because we will mark the page dirty later. for some case is more worse, as we find need to evict those error marked page, we will lost some update that we think the page is not dirty and just remove it from buffer pool.

i think dirty page is not necessary and remove the dirty page cache.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions