Skip to content
This repository was archived by the owner on Jun 6, 2024. It is now read-only.

Global lock on active page = BAD, Make it a channel instead  #20

@SarveshOO7

Description

@SarveshOO7

Make the evictor thread just receive from a channel details about each page that is loaded when it is loaded. This way the active pages would not require a large lock like on this line

async-bpm/src/page/page_handle.rs

Line 177 in f66b7d8

let mut active_guard = self.bpm.active_pages.lock().await;
So instead, it can just be a push to a channel and there will be no contention on a global lock for the active_pages hash map because there will be no hash map.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions