Skip to content
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] TopicStats specify serialized field name #23621

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

crossoverJie
Copy link
Member

@crossoverJie crossoverJie commented Nov 21, 2024

Motivation

image
TopicStats API contains duplicate fields.

Modifications

Use @JsonProperty("isReplicated") to specify serialization names.

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository:

@lhotari
Copy link
Member

lhotari commented Nov 21, 2024

@crossoverJie Which Pulsar client and broker version did you experience this with?

Copy link
Member

@lhotari lhotari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add tests for this change. It's also possible that this is a breaking change which requires more thought to address it.

@codecov-commenter
Copy link

codecov-commenter commented Nov 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.37%. Comparing base (bbc6224) to head (a273ec8).
Report is 743 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #23621      +/-   ##
============================================
+ Coverage     73.57%   74.37%   +0.79%     
- Complexity    32624    34977    +2353     
============================================
  Files          1877     1944      +67     
  Lines        139502   147144    +7642     
  Branches      15299    16226     +927     
============================================
+ Hits         102638   109434    +6796     
- Misses        28908    29270     +362     
- Partials       7956     8440     +484     
Flag Coverage Δ
inttests 27.30% <66.66%> (+2.72%) ⬆️
systests 24.37% <66.66%> (+0.04%) ⬆️
unittests 73.75% <100.00%> (+0.91%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ker/service/persistent/PersistentSubscription.java 76.88% <100.00%> (+0.19%) ⬆️
...mon/policies/data/stats/SubscriptionStatsImpl.java 94.69% <100.00%> (+0.57%) ⬆️

... and 656 files with indirect coverage changes

---- 🚨 Try these New Features:

@crossoverJie crossoverJie requested a review from lhotari November 24, 2024 15:47
Copy link
Member

@dao-jun dao-jun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@crossoverJie
Copy link
Member Author

@lhotari please take a look

Copy link
Member

@lhotari lhotari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#23621 (comment) . We don't want to introduce breaking changes or promote the fields starting with "is"?
Is the duplicate field the only issue?

@crossoverJie
Copy link
Member Author

#23621 (comment) . We don't want to introduce breaking changes or promote the fields starting with "is"? Is the duplicate field the only issue?

Yes, just remove the is prefix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-not-needed Your PR changes do not impact docs ready-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants