Skip to content

refactor(vecmap)!: avoid Clone bound from dedup#2069

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
mainfrom
yannham/vecmap-dedup-safe
Jun 5, 2026
Merged

refactor(vecmap)!: avoid Clone bound from dedup#2069
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
mainfrom
yannham/vecmap-dedup-safe

Conversation

@yannham

@yannham yannham commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Re-implement VecMap::dedup to avoid the Clone bound on keys.

Motivation

It turns out we don't want to add a Clone bounds on SpanText, which is the type of key we'll use in practice. See discussion thread following #2043 (comment).

Additional Notes

N/A

How to test the change?

Existing tests.

@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Clippy Allow Annotation Report

Comparing clippy allow annotations between branches:

  • Base Branch: origin/main
  • PR Branch: origin/yannham/vecmap-dedup-safe

Summary by Rule

Rule Base Branch PR Branch Change

Annotation Counts by File

File Base Branch PR Branch Change

Annotation Stats by Crate

Crate Base Branch PR Branch Change
clippy-annotation-reporter 5 5 No change (0%)
datadog-ffe-ffi 1 1 No change (0%)
datadog-ipc 21 21 No change (0%)
datadog-live-debugger 6 6 No change (0%)
datadog-live-debugger-ffi 10 10 No change (0%)
datadog-profiling-replayer 4 4 No change (0%)
datadog-remote-config 4 4 No change (0%)
datadog-sidecar 58 58 No change (0%)
libdd-common 13 13 No change (0%)
libdd-common-ffi 12 12 No change (0%)
libdd-data-pipeline 5 5 No change (0%)
libdd-ddsketch 2 2 No change (0%)
libdd-dogstatsd-client 1 1 No change (0%)
libdd-profiling 13 13 No change (0%)
libdd-telemetry 20 20 No change (0%)
libdd-tinybytes 4 4 No change (0%)
libdd-trace-normalization 2 2 No change (0%)
libdd-trace-obfuscation 3 3 No change (0%)
libdd-trace-stats 1 1 No change (0%)
libdd-trace-utils 13 13 No change (0%)
Total 198 198 No change (0%)

About This Report

This report tracks Clippy allow annotations for specific rules, showing how they've changed in this PR. Decreasing the number of these annotations generally improves code quality.

@datadog-prod-us1-6

datadog-prod-us1-6 Bot commented Jun 2, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 73.50% (+0.01%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: a3a3885 | Docs | Datadog PR Page | Give us feedback!

@codecov-commenter

codecov-commenter commented Jun 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.50%. Comparing base (d85861b) to head (a3a3885).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2069      +/-   ##
==========================================
+ Coverage   73.47%   73.50%   +0.02%     
==========================================
  Files         475      475              
  Lines       79001    79007       +6     
==========================================
+ Hits        58047    58071      +24     
+ Misses      20954    20936      -18     
Components Coverage Δ
libdd-crashtracker 65.32% <ø> (ø)
libdd-crashtracker-ffi 37.68% <ø> (ø)
libdd-agent-client 83.79% <ø> (ø)
libdd-alloc 98.77% <ø> (ø)
libdd-data-pipeline 86.08% <ø> (+0.01%) ⬆️
libdd-data-pipeline-ffi 73.02% <ø> (ø)
libdd-common 79.93% <ø> (ø)
libdd-common-ffi 74.41% <ø> (ø)
libdd-telemetry 73.34% <ø> (ø)
libdd-telemetry-ffi 31.36% <ø> (ø)
libdd-dogstatsd-client 82.64% <ø> (ø)
datadog-ipc 76.36% <ø> (ø)
libdd-profiling 81.70% <ø> (+0.01%) ⬆️
libdd-profiling-ffi 64.79% <ø> (ø)
libdd-sampling 97.48% <ø> (+0.06%) ⬆️
datadog-sidecar 36.13% <ø> (ø)
datdog-sidecar-ffi 10.31% <ø> (ø)
spawn-worker 48.86% <ø> (ø)
libdd-tinybytes 93.80% <ø> (ø)
libdd-trace-normalization 81.71% <ø> (ø)
libdd-trace-obfuscation 87.30% <ø> (ø)
libdd-trace-protobuf 68.25% <ø> (ø)
libdd-trace-utils 89.32% <100.00%> (+0.01%) ⬆️
libdd-tracer-flare 86.57% <ø> (ø)
libdd-log 74.83% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dd-octo-sts

dd-octo-sts Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 83.49 MB 83.49 MB 0% (0 B) 👌
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 7.70 MB 7.70 MB 0% (0 B) 👌
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 94.58 MB 94.58 MB 0% (0 B) 👌
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 10.34 MB 10.34 MB 0% (0 B) 👌
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 24.73 MB 24.73 MB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 86.89 KB 86.89 KB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 179.89 MB 179.90 MB +0% (+8.00 KB) 👌
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 923.19 MB 923.19 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 8.09 MB 8.09 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 86.89 KB 86.89 KB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 23.91 MB 23.91 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 47.72 MB 47.72 MB 0% (0 B) 👌
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 21.43 MB 21.43 MB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 88.26 KB 88.26 KB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 183.85 MB 183.86 MB +0% (+8.00 KB) 👌
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 915.95 MB 915.95 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 6.25 MB 6.25 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 88.26 KB 88.26 KB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 25.62 MB 25.62 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 45.35 MB 45.35 MB 0% (0 B) 👌
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 74.45 MB 74.45 MB 0% (0 B) 👌
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 8.58 MB 8.58 MB 0% (0 B) 👌
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 89.86 MB 89.86 MB 0% (0 B) 👌
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 10.43 MB 10.43 MB 0% (0 B) 👌

@yannham yannham changed the title refactor(vecmap): avoid Clone bound from dedup refactor!(vecmap): avoid Clone bound from dedup Jun 2, 2026
@yannham yannham changed the title refactor!(vecmap): avoid Clone bound from dedup refactor(vecmap)!: avoid Clone bound from dedup Jun 2, 2026

@ekump ekump left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

just a few minor comments. LGTM.

Comment thread libdd-trace-utils/src/span/vec_map.rs Outdated
Comment thread libdd-trace-utils/src/span/vec_map.rs Outdated
Comment thread libdd-trace-utils/src/span/vec_map.rs Outdated
Comment thread libdd-trace-utils/src/span/vec_map.rs Outdated
Comment thread libdd-trace-utils/src/span/vec_map.rs Outdated
@yannham yannham force-pushed the yannham/vecmap-dedup-safe branch 2 times, most recently from 0b2d55f to b75892f Compare June 5, 2026 12:51
@yannham yannham force-pushed the yannham/vecmap-dedup-safe branch from b75892f to a3a3885 Compare June 5, 2026 13:28
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot merged commit 93e9723 into main Jun 5, 2026
99 checks passed
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot deleted the yannham/vecmap-dedup-safe branch June 5, 2026 14:50
iunanua added a commit that referenced this pull request Jun 8, 2026
# Release proposal for libdd-data-pipeline and its dependencies

This PR contains version bumps based on public API changes and commits
since last release.

## libdd-trace-utils
**Next version:** `8.0.0`
**Semver bump:** `major`
**Tag:** `libdd-trace-utils-v8.0.0`

### Commits

- refactor(vecmap)!: avoid Clone bound from dedup (#2069)

## libdd-telemetry
**Next version:** `5.0.1`
**Semver bump:** `patch`
**Tag:** `libdd-telemetry-v5.0.1`

### Commits

- fix(libdd-telemetry): serialize Method::Other as "*" per OpenAPI spec
(#1998)

## libdd-trace-obfuscation
**Next version:** `4.0.0`
**Semver bump:** `major`
**Tag:** `libdd-trace-obfuscation-v4.0.0`

### ⚠️ major bump forced due to:

- `libdd-trace-utils`: ^5.0.0 → ^7.0.0

### Commits

- ci: bump msrv to 1.87.0 (#2017)

## libdd-trace-stats
**Next version:** `5.0.0`
**Semver bump:** `major`
**Tag:** `libdd-trace-stats-v5.0.0`

### ⚠️ major bump forced due to:

- `libdd-trace-utils`: ^5.0.0 → ^7.0.0

### Commits

- revert!: add from_string to span text (#2011) (#2073)
- fix(send_with_retry): follow max retries of the strategy (#2047)
- ci: bump msrv to 1.87.0 (#2017)

## libdd-data-pipeline
**Next version:** `6.0.0`
**Semver bump:** `major`
**Tag:** `libdd-data-pipeline-v6.0.0`

### ⚠️ major bump forced due to:

- `libdd-trace-utils`: ^5.0.0 → ^7.0.0

### Commits

- feat(data-pipeline)!: add fork safety hooks and cancellation token for
trace exporter FFI (#2051)
- revert!: add from_string to span text (#2011) (#2073)
- feat(data-pipeline): move the async boundary up (#2064)
- feat(trace-exporter): add fail-closed fallback to v04 (#2037)
- fix(send_with_retry): follow max retries of the strategy (#2047)
- refactor(trace-utils): replace use_v05_format bool and remove
infallible expect (#1946)
- ci: bump msrv to 1.87.0 (#2017)

## libdd-sampling (manually bumped as it wasn't included in the
proposal)
**Next version:** `4.0.0`
**Semver bump:** `major`
**Tag:** `libdd-sampling-v4.0.0`

### ⚠️ major bump forced due to:

- `libdd-trace-utils`: ^7.0.0 → ^8.0.0

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: iunanua <18325288+iunanua@users.noreply.github.com>
Co-authored-by: iunanua <igor.unanua@datadoghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants