Skip to content
This repository was archived by the owner on Sep 5, 2025. It is now read-only.

cache file descriptor#31

Merged
marvin-j97 merged 8 commits into
fjall-rs:v2from
k-jingyang:main
Sep 1, 2025
Merged

cache file descriptor#31
marvin-j97 merged 8 commits into
fjall-rs:v2from
k-jingyang:main

Conversation

@k-jingyang
Copy link
Copy Markdown
Contributor

solves #9

@k-jingyang
Copy link
Copy Markdown
Contributor 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
Copy Markdown
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
Comment thread src/value_log.rs Outdated
@k-jingyang
Copy link
Copy Markdown
Contributor 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

Comment thread src/value_log.rs
@marvin-j97
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

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

Agree, I will follow up on this

@k-jingyang
Copy link
Copy Markdown
Contributor 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

Comment thread tests/common.rs Outdated
Comment thread tests/basic_kv.rs
@marvin-j97 marvin-j97 merged commit bbbb6f1 into fjall-rs:v2 Sep 1, 2025
0 of 11 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api enhancement New feature or request performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants