-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
4.x: Additional CQv2 message store optimisations #11112
Conversation
b2f11a2
to
66ad60e
Compare
This comment was marked as outdated.
This comment was marked as outdated.
66ad60e
to
7427cfe
Compare
This comment was marked as outdated.
This comment was marked as outdated.
4351976
to
84695ff
Compare
The first commit greatly improves dirty recovery times. On my machine, with data that's 24 million messages spread over many files and two queues, node recovery goes from 4min30 to less than 2min. The problem was that the old code was gathering messages from queues one by one (meaning 3 or 4 Erlang messages per AMQP message!!). Now it does so per segment file. There are still parts that could be improved for making dirty recovery blazingly fast but they require storing additional state on disk and so will not be investigated fully for now. |
07be784
to
fbf11f5
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
fd3a118
to
817c59e
Compare
d8a5536
to
0575002
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
0575002
to
fa4e1ad
Compare
0720633
to
001cc83
Compare
This only applies to v2 because modifying this part of the v1 code is seen as too risky considering v1 will soon get removed.
It will always use the ETS index. This change lets us do optimisations that would otherwise not be possible, including 81b2c39. A small functional change is included in this commit: we now always use ets:update_counter to update the ref_count, instead of a mix of update_{counter,fields}. When upgrading to 4.0, the index will be rebuilt for all users that were using a custom index module.
It is no longer needed as only a single module uses it.
001cc83
to
cc73b86
Compare
@mkuratczyk did a benchmark and a few checks to see that this PR works as intended. Merging, thanks! |
Planning to include these for 4.0.