Skip to content

BufferPool.java 类的 getPage方法中。没有脏页为什么要flushPage? #1

Open
@ltylty

Description

@ltylty

project2中,BufferPool.java 类的 getPage方法中。没有脏页为什么要flushPage?

if (!hasDirtyPage) {
    try {
        flushPage(removeId);
    } catch(IOException e) {
        e.printStackTrace();
    }
    pagesCacheMap.remove(removeId);
}

我觉得可以改成

if (!hasDirtyPage) {
    pagesCacheMap.remove(removeId);
}

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