-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the issue of case sensitivity when matching keys with cache enabled #4820
Conversation
# Conflicts: # README.md
…ching keys with cache enabled
Codecov Report
@@ Coverage Diff @@
## master #4820 +/- ##
============================================
- Coverage 48.43% 48.36% -0.07%
- Complexity 1721 1722 +1
============================================
Files 346 346
Lines 10819 10827 +8
Branches 1076 1078 +2
============================================
- Hits 5240 5237 -3
- Misses 5257 5268 +11
Partials 322 322
... and 2 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
...ork/apollo/configservice/service/config/ConfigServiceWithCacheAndCacheKeyIgnoreCaseTest.java
Outdated
Show resolved
Hide resolved
...ain/java/com/ctrip/framework/apollo/configservice/service/config/ConfigServiceWithCache.java
Outdated
Show resolved
Hide resolved
...ain/java/com/ctrip/framework/apollo/configservice/service/config/ConfigServiceWithCache.java
Outdated
Show resolved
Hide resolved
...ork/apollo/configservice/service/config/ConfigServiceWithCacheAndCacheKeyIgnoreCaseTest.java
Outdated
Show resolved
Hide resolved
This attempt is commendable, but a problem may arise if the database is set to be case-sensitive. In such a scenario, the cache loader would fail to fetch data from the database, since the appid, cluster, and namespace have all been converted to lowercase. |
There is indeed such a situation, and this PR also considers it. It is currently not enabled by default, and needs to be enabled through a configuration switch. This has also been prominently explained in the documentation. |
…ching keys with cache enabled
# Conflicts: # apollo-configservice/src/main/java/com/ctrip/framework/apollo/configservice/service/config/ConfigServiceWithCache.java # apollo-configservice/src/test/java/com/ctrip/framework/apollo/configservice/service/config/ConfigServiceWithCacheTest.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What's the purpose of this PR
Fix the issue of case sensitivity when matching keys with cache enabled
config-service.cache.key.ignore-case
to control whether the cache key is case-sensitive.Which issue(s) this PR fixes:
Fixes #3529