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

BPM asynchronous setup ergonomics #16

Open
connortsui20 opened this issue Apr 16, 2024 · 0 comments
Open

BPM asynchronous setup ergonomics #16

connortsui20 opened this issue Apr 16, 2024 · 0 comments
Labels
bpm Buffer Pool Manager

Comments

@connortsui20
Copy link
Member

Looking at bpm_test, it is incredibly unergonomic to get a working task runs on top of thread-local instance of the BPM.

First, you need to get access to a DiskManagerHandle, which lets you get access to the thread-local IoUringAsync instance. Then, you have to create a new tokio runtime on that thread where you have to set up the on_thread_park with a daemon that submits and polls. Then somewhere you have to create an eviction task (either on a separate worker thread or a foreground task [which is deadlocking right now 💀]) that makes sure frames are getting freed at reasonable enough times otherwise the entire system will freeze up.

The entire ergonomics of setting this up manually is pretty bad. It would be nice if there was a clear cut way to do this, but considering that the folks over at tokio-uring are having trouble with a similar problem: https://github.com/tokio-rs/tokio-uring/issues issue 292 (not a hyperlink so I don't link them back to here), I don't think that this is an easy design decision to make.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bpm Buffer Pool Manager
Projects
None yet
Development

No branches or pull requests

1 participant