-
-
Notifications
You must be signed in to change notification settings - Fork 130
ref(allocator): Try to use jemalloc for etl-api and etl-replicator #487
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
Conversation
Pull Request Test Coverage Report for Build 19940349400Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 19896703769Details
💛 - Coveralls |
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| #[cfg(all(target_os = "linux", not(target_env = "msvc")))] | ||
| #[allow(non_upper_case_globals)] | ||
| #[unsafe(export_name = "malloc_conf")] | ||
| pub static malloc_conf: &[u8] = | ||
| b"narenas:8,background_thread:true,metadata_thp:auto,dirty_decay_ms:10000,muzzy_decay_ms:10000,tcache_max:8192,abort_conf:true\0"; |
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.
Using #[unsafe(export_name…)] prevents replicator build
The new jemalloc configuration statics use #[unsafe(export_name = "malloc_conf")], but unsafe is not a recognized attribute on stable Rust (only #[export_name = ...] is valid). On non‑MSVC targets this file is compiled for, the compiler rejects the attribute before linking jemalloc, so the replicator binary will not build with the workspace’s stable toolchain. Dropping unsafe or enabling the nightly unsafe_attributes feature is required for this code to compile.
Useful? React with 👍 / 👎.
This PR implements the
tikv-jemallocatorallocator for theetl-replicatorand tweaks it for our workload.