feat(rc): Handle expired config status#2274
Conversation
Drop all RC files when they expire. Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
📚 Documentation Check Results📦
|
There was a problem hiding this comment.
More details
The expiration path clears the shared remote-config index and the client’s applied paths before returning an empty generation, and the shared fetch loop releases the previous generation on that result. No concrete diff-only behavioral regression was identified; targeted execution was blocked by the sandbox’s unavailable pinned Cargo git dependency.
🤖 Datadog Autotest · Commit a3e567e · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest
🔒 Cargo Deny Results📦
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a3e567e2ce
ℹ️ 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".
| "Agent served remote config from an expired cache for target {target:?}, \ | ||
| dropping all stored configurations" | ||
| ); | ||
| self.state.target_files_by_path.lock_or_panic().clear(); |
There was a problem hiding this comment.
Preserve shared fetcher ownership when expiring configs
When one SharedFetcher in a MultiTargetFetcher receives CONFIG_STATUS_EXPIRED, clearing this shared map immediately bypasses RefcountingStorage's ownership/inactive-file path. If another target still holds the old Arc in its last_files or has an in-flight request that advertised the file as cached, its next OK response sees an empty map and can try to store the same path before the old handle is expired, or fail with Found ... in client_configs response, but it isn't stored; either way that target can keep serving stale expired config. Expiry needs to go through the shared refcount/inactive mechanism or otherwise coordinate all shared runners before dropping the map.
Useful? React with 👍 / 👎.
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: a3e567e | Docs | Datadog PR Page | Give us feedback! |
BenchmarksComparisonBenchmark execution time: 2026-07-24 18:20:11 Comparing candidate commit a3e567e in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 2 metrics, 0 unstable metrics.
|
| cpu_model | git_commit_sha | git_commit_date | git_branch |
|---|---|---|---|
| Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz | a3e567e | 1784916737 | bob/expired |
| scenario | metric | min | mean ± sd | median ± mad | p75 | p95 | p99 | max | peak_to_median_ratio | skewness | kurtosis | cv | sem | runs | sample_size |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| sdk_test_data/rules-based | execution_time | 124.088µs | 127.352µs ± 5.538µs | 126.218µs ± 0.541µs | 126.863µs | 131.630µs | 148.499µs | 189.381µs | 50.04% | 8.246 | 81.724 | 4.34% | 0.392µs | 1 | 200 |
| scenario | metric | 95% CI mean | Shapiro-Wilk pvalue | Ljung-Box pvalue (lag=1) | Dip test pvalue |
|---|---|---|---|---|---|
| sdk_test_data/rules-based | execution_time | [126.585µs; 128.120µs] or [-0.603%; +0.603%] | None | None | None |
Group 2
| cpu_model | git_commit_sha | git_commit_date | git_branch |
|---|---|---|---|
| Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz | a3e567e | 1784916737 | bob/expired |
| scenario | metric | min | mean ± sd | median ± mad | p75 | p95 | p99 | max | peak_to_median_ratio | skewness | kurtosis | cv | sem | runs | sample_size |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| single_flag_killswitch/rules-based | execution_time | 156.717ns | 160.058ns ± 2.499ns | 159.756ns ± 1.734ns | 161.444ns | 164.583ns | 168.004ns | 169.387ns | 6.03% | 1.151 | 1.795 | 1.56% | 0.177ns | 1 | 200 |
| scenario | metric | 95% CI mean | Shapiro-Wilk pvalue | Ljung-Box pvalue (lag=1) | Dip test pvalue |
|---|---|---|---|---|---|
| single_flag_killswitch/rules-based | execution_time | [159.711ns; 160.404ns] or [-0.216%; +0.216%] | None | None | None |
Baseline
Baseline benchmark details
Group 1
| cpu_model | git_commit_sha | git_commit_date | git_branch |
|---|---|---|---|
| Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz | 43156bb | 1784914882 | main |
| scenario | metric | min | mean ± sd | median ± mad | p75 | p95 | p99 | max | peak_to_median_ratio | skewness | kurtosis | cv | sem | runs | sample_size |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| sdk_test_data/rules-based | execution_time | 123.389µs | 126.595µs ± 5.324µs | 125.573µs ± 0.681µs | 126.322µs | 130.244µs | 147.328µs | 183.175µs | 45.87% | 7.610 | 69.300 | 4.20% | 0.376µs | 1 | 200 |
| scenario | metric | 95% CI mean | Shapiro-Wilk pvalue | Ljung-Box pvalue (lag=1) | Dip test pvalue |
|---|---|---|---|---|---|
| sdk_test_data/rules-based | execution_time | [125.857µs; 127.333µs] or [-0.583%; +0.583%] | None | None | None |
Group 2
| cpu_model | git_commit_sha | git_commit_date | git_branch |
|---|---|---|---|
| Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz | 43156bb | 1784914882 | main |
| scenario | metric | min | mean ± sd | median ± mad | p75 | p95 | p99 | max | peak_to_median_ratio | skewness | kurtosis | cv | sem | runs | sample_size |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| single_flag_killswitch/rules-based | execution_time | 156.738ns | 160.305ns ± 3.168ns | 159.613ns ± 1.797ns | 161.457ns | 166.966ns | 170.434ns | 175.456ns | 9.93% | 1.573 | 3.179 | 1.97% | 0.224ns | 1 | 200 |
| scenario | metric | 95% CI mean | Shapiro-Wilk pvalue | Ljung-Box pvalue (lag=1) | Dip test pvalue |
|---|---|---|---|---|---|
| single_flag_killswitch/rules-based | execution_time | [159.866ns; 160.744ns] or [-0.274%; +0.274%] | None | None | None |
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-unknown-linux-gnu
|
Drop all RC files when they expire.
Adds the equivalent capability of DataDog/dd-trace-py@bc2b16b.