Remove LegacyTagMap; OptimizedTagMap is the sole TagMap implementation#11678
Draft
dougqh wants to merge 2 commits into
Draft
Remove LegacyTagMap; OptimizedTagMap is the sole TagMap implementation#11678dougqh wants to merge 2 commits into
dougqh wants to merge 2 commits into
Conversation
With one implementor, the optimized/legacy split is dead weight. Delete LegacyTagMap and LegacyTagMapFactory; collapse the whole TagMapFactory abstraction (TagMap.create()/create(int)/EMPTY now construct OptimizedTagMap directly via a lazy EmptyHolder that avoids a TagMap<->OptimizedTagMap static-init cycle). OptimizedTagMap is the sole TagMap implementor, satisfying CHA's unique-implementor precondition. Delete the now-trivial TagMapType/TagMapTypePair test enums and de-parameterize their tests to plain @test; TagMapScenario (size-based) stays. Drop stale "legacy and optimized" references from javadoc. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The flag only chose between the optimized and legacy TagMap impls; with Legacy gone it controls nothing. Remove the Config field/getter, the GeneralConfig constant, and the metadata/supported-configurations.json entry. Per the Config team, removing the registry entry is detected automatically at the next release (FPD + public docs get a "Max Version: v1.xx.0" marker), so the hard delete is the correct process. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
Contributor
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
OptimizedTagMaphas been the default for some time (theoptimized.map.enabledflag defaulted totrue). With Legacy effectively dead, this removes it soOptimizedTagMapis the soleTagMapimplementor — satisfying CHA's unique-implementor precondition (a prerequisite for upcoming read-through / dense-store work).Changes
LegacyTagMapand the wholeTagMapFactoryabstraction (the abstract class + its loneOptimizedTagMapFactory);TagMap.create()/create(int)/EMPTYnow constructOptimizedTagMapdirectly.TagMapType/TagMapTypePairtest enums and de-parameterize their tests to plain@Test.TagMapScenario(parameterizes by size) is kept.optimized.map.enabledflag —Configfield/getter,GeneralConfigconstant, and themetadata/supported-configurations.jsonentry. Per the Config team, removing the registry entry is detected automatically at the next release (FPD + public docs get aMax Version: v1.xx.0marker).Notable
TagMap(interface with default methods) ↔OptimizedTagMapcould leaveTagMap.EMPTYnull whenOptimizedTagMapinitialized first. A lazyEmptyHolderbuilds the empty singleton via the constructor instead of reading a mid-<clinit>static.isOptimized()is intentionally left in place — it now constant-folds totrueand is DCE'd at its call site (DDSpanContext); simplifying it away is a trivial follow-up.Validation
internal-apiTagMap suite green (TagMapTest,TagMapLedgerTest,TagMapFuzzTest);internal-api/dd-trace-api/dd-trace-corecompile clean.dd-trace-coreintegration run before marking ready.Benchmark — overhead-neutral (parity)
TagMapAccessBenchmark(threading-correct,@Threads(8)) run on the pre-kill tree vs. this branch — the two differ by exactly these two commits (verified byte-identical pre-image). Throughput, 1 fork, 3 warmup + 5 measurement iters:insertgetObjectgetEntryAll deltas are within run-to-run error (single fork) → no measurable change, as expected for a dead-code removal.
🤖 Generated with Claude Code