Skip to content

Conversation

@funky-eyes
Copy link
Contributor

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

  • Make sure there is a GitHub_issue field for the change.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • 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 project.
  • Make sure gitHub actions can pass. Why the workflow is failing and how to fix it?

@codecov-commenter
Copy link

codecov-commenter commented Jan 22, 2026

Codecov Report

❌ Patch coverage is 55.10204% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 41.27%. Comparing base (c2df4ac) to head (d800fd4).

Files with missing lines Patch % Lines
...bo/registry/support/CacheableFailbackRegistry.java 55.10% 10 Missing and 12 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                3.2   #16033      +/-   ##
============================================
- Coverage     41.27%   41.27%   -0.01%     
- Complexity    10493    10496       +3     
============================================
  Files          1652     1652              
  Lines         71461    71492      +31     
  Branches      10163    10175      +12     
============================================
+ Hits          29499    29506       +7     
- Misses        37837    37850      +13     
- Partials       4125     4136      +11     
Flag Coverage Δ
integration-tests 38.31% <51.02%> (-0.02%) ⬇️
samples-tests 36.33% <55.10%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants