-
Notifications
You must be signed in to change notification settings - Fork 34
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
StreamQueue: only unmap unused segments #557
Conversation
Don't like the 60s sleep.. I think we can do better than that. Maybe a channel that consumers can notify when they switch segment. |
A channel that consumers notify when switching segments sounds good to me. Should we unmap on consumer disconnect as well? |
Ah, when consumer is disconnecting too, good catch, we don't do that in the normal queues either currently. |
Main benchmark PR benchmark Keep in mind, these numbers are not representative of LavinMQ's peak performance. |
fb44bff
to
5b1b092
Compare
Previous behavior could unmap segments that other consumers were still delivering from, causing segfaults.
Digest would otherwise with its small IO.copy buffer use the double buffering.
FileUtil.rm_rf would otherwise possibly have to iterate over a lot of files
2b1534d
to
f1a9d7f
Compare
Memory should never be allocated in a finalize method so can't have the risk of raising something there
File.write in 1.9.2 allocates a write buffer, which is unessecary
9f94f1a
to
5d845eb
Compare
Previous behavior could unmap segments that other consumers were still delivering from, causing segfaults.