Skip to content

Commit 59e693b

Browse files
committed
Add more context in comments
1 parent 943f34e commit 59e693b

File tree

1 file changed

+5
-0
lines changed
  • remote-config/remote-config-core/src/main/java/datadog/remoteconfig/state

1 file changed

+5
-0
lines changed

remote-config/remote-config-core/src/main/java/datadog/remoteconfig/state/ProductState.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ public boolean apply(
9090
}
9191

9292
// Step 3: Remove obsolete configurations (for all products)
93+
// For ASM_DD, this is critical: removes MUST happen before applies to prevent
94+
// duplicate rule warnings from the ddwaf rule parser and causing memory spikes.
9395
List<ParsedConfigKey> keysToRemove =
9496
cachedTargetFiles.keySet().stream()
9597
.filter(configKey -> !configBeenUsedByProduct.contains(configKey))
@@ -101,6 +103,9 @@ public boolean apply(
101103
}
102104

103105
// Step 4: For ASM_DD, apply changes AFTER removes
106+
// TODO: This is a temporary solution. The proper fix requires better synchronization
107+
// between remove and add/update operations. This should be discussed
108+
// with the guild to determine the best long-term design approach.
104109
if (product == Product.ASM_DD) {
105110
for (ParsedConfigKey configKey : changedKeys) {
106111
try {

0 commit comments

Comments
 (0)