juicewcode commented on PR #6973: URL: https://github.com/apache/shenyu/pull/6973#issuecomment-5426784445
> Reusing `after` fixes the double-build inconsistency, but update still leaves a stale cache entry when `metricName` changes. `ScaleRuleCache` is keyed by `metricName`, and the update path only puts the updated rule under the new key; it never removes the old metric-name key for the same id. After renaming a rule, `getAllRules()` can therefore return both the old cached rule and the updated one until cache reload/restart. Could you load the existing rule before update and remove the old metric-name key when it differs from the new one before adding the updated rule? PR #6975 is based on this cache consistency fix and additionally removes the stale cache entry when a rule's metricName changes. It also includes ID-based cache eviction for deletion and preserves the database id when caching newly created rules. This PR can be closed in favor of PR #6975. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
