-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: Implement incremental update protocol with multi-version compatibility #1611
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
base: develop
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR implements an incremental update protocol with multi-version compatibility to address protocol rigidity and extensibility issues. The solution separates core thread pool parameters from extended monitoring/alarm parameters, preventing unnecessary client refreshes when non-critical fields change or are renamed.
Key Changes:
- Introduces protocol version 2 with core-only MD5 comparison (v1 remains full MD5 for backward compatibility)
- Implements field adapters in ThreadPoolParameterInfo to handle coreSize/corePoolSize naming variations
- Adds utilities for generating versioned MD5 hashes and extracting core vs. extended parameters
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
Md5ConfigUtil.java | Extracts client protocol version from request header and passes to comparison logic |
ConfigCacheService.java | Adds version-aware MD5 comparison using incremental MD5 for v2+ clients |
ClientWorker.java | Updates client to use protocol version 2 and incremental content generation |
CacheData.java | Initializes cache with incremental content based on protocol version |
IncrementalMd5Util.java | Provides versioned MD5 generation and change type detection utilities |
IncrementalContentUtil.java | Implements core/extended parameter separation and field adapter integration |
ContentUtil.java | Integrates field adapters for backward-compatible content generation |
ProtocolRigidityTest.java | Tests field renaming compatibility across protocol versions |
ExtensibilityTest.java | Verifies extended parameter additions don't trigger unnecessary refreshes |
ContentUtilTest.java | Validates field adapter behavior with old and new field names |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Problem:
Solution:
Key Changes:
Test Coverage: