Skip to content
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

Refactor handling of file descriptors #199

Open
slfritchie opened this issue Sep 19, 2014 · 1 comment
Open

Refactor handling of file descriptors #199

slfritchie opened this issue Sep 19, 2014 · 1 comment

Comments

@slfritchie
Copy link
Contributor

Here's an issue to yank out of my todo emailbox and into a more difficult to forget forum. Bitcask's handling of large numbers of file descriptors should probably change. From @engelsanchez: "It would be easy to change to a dict or small -> list/big -> dict hybrid. Notice though that my code is reusing the same list manipulation that we use to look up files on a bitcask:get(), so I wouldn't expect any new surprises there."

@engelsanchez
Copy link
Contributor

Thanks for moving from internal TODO to an issue Scott! For the record, Scott is talking about several places in Bitcask that handle file descriptors in lists. For example, on a get to fetch the descriptor for the file that contains the value. That makes all of these operations O(n) when they should be closer to O(1). This fact is probably hidden by any number of other inefficiencies, but there is no reason to keep it the way it is, except time to refactor and re-verify.

Some examples. There might be more:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants