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

Load items eagerly in memdb_iterator #2

Merged
merged 1 commit into from
May 19, 2023
Merged

Conversation

codchen
Copy link
Collaborator

@codchen codchen commented May 19, 2023

The old logic would wait till all items to be sent to the channel before releasing the mutex, which would often cause deadlocks since sending to a channel is blocking.

The new logic would load all item pointers into a list, release the mutex, then start to send to the channel. Memory usage would increase but since we are only storing pointers and not loading from disk, it should be manageable.

@codchen codchen merged commit 152aa18 into main May 19, 2023
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

Successfully merging this pull request may close these issues.

2 participants