MrCroxx / RunKV

[WIP] An experimental cloud-native distributed KV engine for OLTP workload.
MIT License
68 stars 7 forks source link

feat: introduce LogQueue abstraction to simplify the race condition #170

Closed MrCroxx closed 2 years ago

MrCroxx commented 2 years ago

What changes were proposed in this pull request?

As titled.

Besides, this PR also tried use read_at and write_at to avoid locking a fd. But currently tokio doesn't support read_at or write_at for now. So, it's needed to use tokio::task::spawn_blocking with std::fs::File and communicate with tokio::sync::oneshot. But after benching the approach, it's found that the jitter of the latency is extremely high. So I abandon the implementation. You can found them in the commit logs if you are interested.

Which issues is this PR related to?

160