-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[#noissue] Refactor HostApplication RowKey handling #13185
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
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 refactors HostApplication row key handling to standardize the use of uidRowKeyDistributor across both collector and web modules, adds service type code inversion to UidLinkRowKey for improved row key structure consistency, and enhances debug logging for better operational traceability.
- Standardized row key distribution by replacing
acceptApplicationRowKeyDistributorwithuidRowKeyDistributoracross configuration files - Updated
UidLinkRowKeyto invert service type codes during encoding and restore them during decoding for consistent row key ordering - Enhanced debug logging in application mapping components to provide better visibility into row key operations and virtual link creation
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
collector/src/main/java/com/navercorp/pinpoint/collector/applicationmap/config/MapV3Configuration.java |
Updated qualifier to use uidRowKeyDistributor instead of acceptApplicationRowKeyDistributor for consistency |
web/src/main/java/com/navercorp/pinpoint/web/applicationmap/config/MapV3DaoConfiguration.java |
Updated bean definitions to inject uidRowKeyDistributor and pass it to HostApplicationMapperV3 |
web/src/main/java/com/navercorp/pinpoint/web/applicationmap/dao/v3/HostApplicationMapperV3.java |
Added RowKeyDistributor dependency injection and debug logging for row key operations; corrected comment from serviceCode to serviceUid |
web/src/main/java/com/navercorp/pinpoint/web/applicationmap/dao/hbase/HbaseHostApplicationMapDao.java |
Added conditional debug logging with application details for better traceability |
web/src/main/java/com/navercorp/pinpoint/web/applicationmap/map/processor/RpcCallProcessor.java |
Added debug logging for virtual link marker operations |
commons-server/src/main/java/com/navercorp/pinpoint/common/server/applicationmap/statistics/UidLinkRowKey.java |
Replaced PinpointConstants.APPLICATION_NAME_MAX_LEN_V3 with KEY_SIZE constant; added service type inversion during encoding and restored it during decoding; removed unused offset increment |
commons-server/src/test/java/com/navercorp/pinpoint/common/server/applicationmap/statistics/UidLinkRowKeyTest.java |
Updated test cases to use UidLinkRowKey.KEY_SIZE constant and adjusted timestamp values for consistency |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| private final Logger logger = LogManager.getLogger(this.getClass()); | ||
|
|
||
| private static final int saltKeySize = ByteSaltKey.SALT.size(); |
Copilot
AI
Dec 9, 2025
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.
The saltKeySize field is defined but never used in the class. The code at line 76 uses rowKeyDistributor.getSaltKeySize() instead. Consider removing this unused field to improve code maintainability.
| private static final int saltKeySize = ByteSaltKey.SALT.size(); |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #13185 +/- ##
============================================
- Coverage 33.38% 33.30% -0.09%
+ Complexity 10955 10954 -1
============================================
Files 4065 4071 +6
Lines 93965 94179 +214
Branches 9779 9799 +20
============================================
- Hits 31372 31367 -5
- Misses 59917 60135 +218
- Partials 2676 2677 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
00b74fb to
fa388e2
Compare
This pull request introduces a series of changes to improve the handling of UID-based row keys and related application mapping logic in both the collector and web modules. The main focus is on standardizing the use of
uidRowKeyDistributorfor row key distribution, updating row key encoding and decoding to use inversion for service type codes, and enhancing debug logging for better traceability. Additionally, the changes update test cases and refactor code for improved clarity and maintainability.Row Key Distribution and Encoding Updates:
acceptApplicationRowKeyDistributortouidRowKeyDistributorin both collector and web configuration files to standardize row key handling. (MapV3Configuration.java[1]MapV3DaoConfiguration.java[2]UidLinkRowKeyencoding to invert the service type code when writing and restore it when reading, ensuring consistency in row key structure. (UidLinkRowKey.java[1] [2]API and Constant Refactoring:
PinpointConstants.APPLICATION_NAME_MAX_LEN_V3with a localKEY_SIZEconstant for application name length validation inUidLinkRowKey. (UidLinkRowKey.javacommons-server/src/main/java/com/navercorp/pinpoint/common/server/applicationmap/statistics/UidLinkRowKey.javaL106-R105)KEY_SIZEconstant and adjusted timestamp values for consistency. (UidLinkRowKeyTest.java[1] [2] [3]Dependency Injection and Mapper Improvements:
HostApplicationMapperV3to require aRowKeyDistributorand log row key details for debugging, improving traceability of mapping operations. (HostApplicationMapperV3.java[1] [2]hostApplicationResultExtractorV3to inject theuidRowKeyDistributor. (MapV3DaoConfiguration.javaweb/src/main/java/com/navercorp/pinpoint/web/applicationmap/config/MapV3DaoConfiguration.javaL198-R201)Debug Logging Enhancements:
HbaseHostApplicationMapDao.java[1]RpcCallProcessor.java[2]HostApplicationMapperV3.java[3]Minor Cleanups:
UidLinkRowKey.java[1]HostApplicationMapperV3.java[2]