-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[improve][broker] Remove uneffective solution for reducing GC pressure #20428
[improve][broker] Remove uneffective solution for reducing GC pressure #20428
Conversation
/pulsarbot rerun-failure-checks |
@JsonIgnore | ||
private int producerNameLength; | ||
|
||
private String producerName; |
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.
How can these changes affect JSON serde code path? I don't know if we pass or persist these classes via JSON somewhere.
If no, @JsonIgnore
can be redundant. If so, adding new serialize field may affect especially this is a class under pulsar-common.
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 former @JsonIgnore
annotations were needed because of the extra ordinary solution to store String values. They aren't needed anymore.
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.
There is no change in JSON serialization and deserialization from an external viewpoint.
Motivation
The PublisherStatsImpl and ConsumerStatsImpl classes contain an uneffective solution for reducing GC pressure.
This code is confusing and doesn't help. Instead, ordinary fields are used.
The solution was originally introduced by #1480.
Modifications
Additional Context
The Guava Interner based solution in #20432 could be a way to reduce GC pressure in a more effective way if there is a need for that.
Documentation
doc
doc-required
doc-not-needed
doc-complete