Skip to content

Conversation

@iambriccardo
Copy link
Contributor

@iambriccardo iambriccardo commented Dec 3, 2025

This PR implements the tikv-jemallocator allocator for the etl-replicator and tweaks it for our workload.

@coveralls
Copy link

coveralls commented Dec 3, 2025

Pull Request Test Coverage Report for Build 19940349400

Warning: 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

  • 0 of 104 (0.0%) changed or added relevant lines in 2 files are covered.
  • 129 unchanged lines in 8 files lost coverage.
  • Overall coverage decreased (-0.6%) to 81.806%

Changes Missing Coverage Covered Lines Changed/Added Lines %
etl-replicator/src/main.rs 0 1 0.0%
etl-replicator/src/jemalloc_metrics.rs 0 103 0.0%
Files with Coverage Reduction New Missed Lines %
etl/src/workers/table_sync.rs 1 77.66%
etl/src/replication/table_sync.rs 2 82.43%
etl-api/src/configs/source.rs 5 96.3%
etl-api/src/routes/destinations_pipelines.rs 8 86.02%
etl-api/src/utils.rs 11 91.47%
etl-api/src/routes/sources/publications.rs 20 0.0%
etl-api/src/configs/destination.rs 28 91.87%
etl-api/src/k8s/http.rs 54 89.24%
Totals Coverage Status
Change from base Build 19892156494: -0.6%
Covered Lines: 16501
Relevant Lines: 20171

💛 - Coveralls

@coveralls
Copy link

Pull Request Test Coverage Report for Build 19896703769

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 98 unchanged lines in 8 files lost coverage.
  • Overall coverage decreased (-0.01%) to 82.372%

Files with Coverage Reduction New Missed Lines %
etl/src/pipeline.rs 2 81.56%
etl/src/types/event.rs 2 37.84%
etl/src/workers/table_sync.rs 2 77.41%
etl-postgres/src/tokio/test_utils.rs 6 85.96%
etl/src/test_utils/event.rs 8 80.77%
etl/src/test_utils/notify.rs 8 87.1%
etl/src/test_utils/test_destination_wrapper.rs 14 73.61%
etl/src/replication/client.rs 56 79.57%
Totals Coverage Status
Change from base Build 19892156494: -0.01%
Covered Lines: 16453
Relevant Lines: 19974

💛 - Coveralls

@iambriccardo iambriccardo marked this pull request as ready for review December 5, 2025 08:20
@iambriccardo iambriccardo requested a review from a team as a code owner December 5, 2025 08:20
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

Comment on lines +24 to +28
#[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";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@iambriccardo iambriccardo merged commit 447557b into main Dec 5, 2025
15 of 19 checks passed
@iambriccardo iambriccardo deleted the update-allocator branch December 5, 2025 08:45
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.

4 participants