-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[#12966] Backport: Remove validation annotations from high-frequency collector methods to fix performance regression #12967
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
[#12966] Backport: Remove validation annotations from high-frequency collector methods to fix performance regression #12967
Conversation
|
|
…methods Co-authored-by: emeroad <[email protected]>
|
@copilot |
I've attempted to squash the commits locally, but the To squash these commits, a force push is required since the remote branch history needs to be rewritten. This can be done manually with Would you like me to:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 3.0.x #12967 +/- ##
============================================
+ Coverage 36.64% 36.65% +0.01%
- Complexity 12250 12251 +1
============================================
Files 4077 4077
Lines 100337 100337
Branches 10618 10618
============================================
+ Hits 36766 36779 +13
+ Misses 60575 60564 -11
+ Partials 2996 2994 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@copilot |
I've squashed the commits locally (commit 2be2845). The squashed commit has the message from the second commit as requested. However, pushing this requires The squashed commit is ready locally with all changes intact. It needs manual force push to update the remote branch. |
|
@copilot |
I've squashed the 2 commits into 1 locally (commit 27da9d0) with the message from the second commit. However, To update this PR with the squashed commit, a force push is needed: Alternatively, if you want a completely new PR, the squashed commit (27da9d0) can be pushed to a new branch. |
Overview
This PR backports the performance regression fix from issue #12961 to the 3.0.x branch. The fix removes Java Bean Validation annotations from high-frequency collector methods that were causing approximately 20% extra CPU usage during normal workload operations.
Problem
After upgrading from Pinpoint 2.x to 3.x, the collector was consuming noticeably more CPU (~20% higher) for the same workload. Analysis identified that annotation-based validation on frequently invoked methods was the root cause:
com.navercorp.pinpoint.collector.service.HbaseTraceService#insertSpanChunkcom.navercorp.pinpoint.collector.service.HbaseTraceService#insertSpancom.navercorp.pinpoint.collector.service.StatisticsService#updateCallercom.navercorp.pinpoint.collector.service.StatisticsService#updateCalleeThese methods are invoked on every span/span-chunk received by the collector, making the validation overhead significant under high load.
Solution
Removed Java Bean Validation annotations (
@Valid,@NotBlank,@Validated) from the affected service classes and methods. The validation was redundant because:ServerHeaderReaderwhich performs all necessary checksChanges
Modified Files (3 files, 32 insertions, 19 deletions)
TraceService.java
@Validannotations from interface methodsHbaseTraceService.java
@Validatedclass annotation@Validannotations from method parametersStatisticsService.java
@Validatedclass annotation@NotBlankannotations from all String parameters inupdateCaller,updateCallee,updateResponseTime, andupdateAgentStatemethodsImpact
Related
Co-authored-by: emeroad [email protected]
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.