funky-eyes opened a new pull request, #16033:
URL: https://github.com/apache/dubbo/pull/16033

   ## What is the purpose of the change?
   
   
原代码逻辑是想去除timestamp,pid这种可变的值,剥离后生成出一串不可变的url作为key,进行缓存,避免该实例重启或重新注册到zk,可变值产生变化导致缓存失效,stringUrls中的缓存膨胀的问题,但是这样去除后,在loadbalance进行预热时,由于timestamp被过滤从而无法获取timestamp,导致预热功能失效。
   
以及修复源代码逻辑存在缺点,比如老的dubbox,dubbo2.6左右的版本存在remote.timestamp,default.remote.timestamp,该逻辑会导致假设url为remote.timestamp=xxxx&revision=xxxx
   被过滤后就变成了remote.revision=xxxx,导致revision这个参数直接消失了。
   
   The original logic intended to strip out variable fields like timestamp and 
pid from the URL, generating a stable, immutable string as the cache key. This 
prevents cache invalidation when an instance restarts or re-registers to 
ZooKeeper (due to changing values), and avoids cache bloat in stringUrls.
   However, after removing these fields, during load balancing pre-warming, the 
absence of timestamp means it can no longer be retrieved, causing the 
pre-warming functionality to fail completely.
   Additionally, the original logic has a flaw: in older Dubbo versions (e.g., 
DubboX or Dubbo 2.6), parameters such as remote.timestamp and 
default.remote.timestamp exist. When filtering removes timestamp, a URL like 
remote.timestamp=xxxx&revision=xxxx becomes remote.revision=xxxx, causing the 
revision parameter to disappear entirely.
   
   ## Checklist
   - [x] Make sure there is a 
[GitHub_issue](https://github.com/apache/dubbo/issues) field for the change.
   - [x] Write a pull request description that is detailed enough to understand 
what the pull request does, how, and why.
   - [x] Write necessary unit-test to verify your logic correction. If the new 
feature or significant change is committed, please remember to add sample in 
[dubbo samples](https://github.com/apache/dubbo-samples) project.
   - [x] Make sure gitHub actions can pass. [Why the workflow is failing and 
how to fix it?](../CONTRIBUTING.md)
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to