juicewcode commented on PR #6975:
URL: https://github.com/apache/shenyu/pull/6975#issuecomment-5426753442

   > This delete-by-ID eviction still depends on the cached rule ID matching 
the database row ID, but this PR is based on `master`, where 
`ScaleRuleServiceImpl#create` still inserts one `ScaleRuleDO` and then caches a 
second `ScaleRuleDO` built from the blank-id DTO. 
`ScaleRuleDO.buildScaleRuleDO` generates a fresh UUID when the DTO id is empty, 
so rules created through the service can still have a cached id that differs 
from the DB id being deleted. Could you include the create-side cache fix here, 
or base this after the fix from #6973, so delete-by-ID eviction can actually 
find newly created cached rules?
   
   This change is based on the cache consistency fix from PR #6973 .
   
    The following cache consistency issues are addressed:
     - Newly created rules are cached using the same ScaleRuleDO instance that 
was inserted into the database, ensuring that
     the cached rule id matches the database id.
     - For deletion, cached rules are located by their database primary keys 
and removed using their metric-name cache keys.
     - When a rule's metricName is changed, the previous metric-name cache 
entry is removed before the updated rule is cached.


-- 
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]

Reply via email to