Skip to content

cache file descriptor #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: v2
Choose a base branch
from
Open

cache file descriptor #31

wants to merge 7 commits into from

Conversation

k-jingyang
Copy link

solves #9

@k-jingyang
Copy link
Author

k-jingyang commented Apr 5, 2025

Although we mentioned using BufReader instead of File in #9, I think that File is just enough abstraction to hold the file descriptor. Caching BufReader limits how we want to use the file descriptor (i.e. maybe we use something else instead of BufReader next time).

@marvin-j97
Copy link
Contributor

marvin-j97 commented Apr 5, 2025

lsm-tree currently uses BufReader<File>, so it's not really compatible right now

Also when using a BufReader, we can still look inside it to get the File

@marvin-j97 marvin-j97 added enhancement New feature or request api performance labels Apr 5, 2025
@k-jingyang
Copy link
Author

lsm-tree currently uses BufReader<File>, so it's not really compatible right now

Also when using a BufReader, we can still look inside it to get the File

Got it, let me check this out

@marvin-j97
Copy link
Contributor

Probably should add a simple test for the FdCache (hit, no hit)

@marvin-j97 marvin-j97 changed the base branch from main to v2 April 9, 2025 02:09
@k-jingyang
Copy link
Author

Probably should add a simple test for the FdCache (hit, no hit)

Agree, I will follow up on this

@k-jingyang
Copy link
Author

k-jingyang commented Apr 12, 2025

Probably should add a simple test for the FdCache (hit, no hit)

Agree, I will follow up on this

Added the test in basic_kv.rs. Do let me know your comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api enhancement New feature or request performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants