-
Notifications
You must be signed in to change notification settings - Fork 3k
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 code server to use a single queue #8744
Conversation
CT Test Results 2 files 70 suites 1h 5m 20s ⏱️ Results for commit 72f2c90. ♻️ This comment has been updated with latest results. To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts// Erlang/OTP Github Action Bot |
Ideally this would be merged on |
83ceaf7
to
6baba91
Compare
Thanks for your contribution. I plan to look at this after ICFP (in 10 days) approx |
Please don't merge this yet. I have tried this branch in a project and, while I didn't notice any bugs, compilation times for Elixir (which loads several modules) was affected negatively. |
False alarm, I had mixed my Erlang versions. Overall, I didn't measure any performance degradation in my usual code loading benchmarks. :) |
Looking into it this week |
This was on hold due to other investigations regarding current issues in code_server. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
These changes make the code_server
easier to follow.
We are running some internal tests and will merge next week if all is green
Glad to hear so! 🎉 Code loading is a state machine and the previous version was encoding the states via anonymous functions and in two separate queues, which made it very hard to follow. :) |
Completely agree, it was pretty tricky to follow the logic. This was a great improvement. Since the next OTP release 27.2 is around beginning of December, I am wondering if we can place this already on |
As long as we are comfortable with potentially doing a 27.2.1 with this commit reverted, it sounds good to me. :D |
Update This will be merged in on_load = #{} :: #{module() => {on_load_file(), client_pid(), on_load_pid()}},
loading = #{} :: #{module() => [{loading_action(), client_pid()}]}}). |
f7a874a
to
5fcd6f5
Compare
Please do some squashing of the commits before merging this. At least squash the second commit into the first, or squash all commits into one. |
@kikofernandez let me know if you want me to do the squashing. :) |
sure, go ahead! I will merge if our internal builds look good after lunch |
Prior to this patch, the code server had two internal queues, one to track module loading and another to track on_load callbacks. This pull requests refactors the code to have a single queue, in order to fix bugs and improve maintainability. Closes erlang#7466. Closes erlang#8510.
5fcd6f5
to
72f2c90
Compare
The PR erlang#8744 instroduced a call to read_file_info that needs to be allowed for the testcase to pass.
The PR erlang#8744 instroduced a call to read_file_info that needs to be allowed for the testcase to pass.
Prior to this patch, the code server had two
internal queues, one to track module loading
and another to track on_load callbacks. This
pull requests refactors the code to have a
single queue, in order to fix bugs and improve
maintainability.
Closes #7466.
Closes #8510.