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

[fix][broker] do not serialize field bundleStats #18150

Merged
merged 6 commits into from
Oct 25, 2022

Conversation

thetumbled
Copy link
Member

@thetumbled thetumbled commented Oct 21, 2022

Fixes #17738

Modifications

because broker will do not use the field bundleStats, so we could do not serialize the field bundleStats.

Verifying this change

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

Documentation

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

Matching PR in forked repository

PR in forked repository:
thetumbled#3

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Oct 21, 2022
@codelipenghui codelipenghui added this to the 2.12.0 milestone Oct 24, 2022
@codelipenghui codelipenghui changed the title do not serialize field bundleStats [fix][broker] do not serialize field bundleStats Oct 24, 2022
@codelipenghui codelipenghui added type/bug The PR fixed a bug or issue reported a bug area/broker type/cleanup Code or doc cleanups e.g. remove the outdated documentation or remove the code no longer in use labels Oct 24, 2022
@codelipenghui codelipenghui changed the title [fix][broker] do not serialize field bundleStats [cleanup][broker] do not serialize field bundleStats Oct 24, 2022
Copy link
Contributor

@codelipenghui codelipenghui left a comment

Choose a reason for hiding this comment

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

Nice catch!
Could you please help add an unit test to make sure we will not break it again in the future?

@codelipenghui codelipenghui changed the title [cleanup][broker] do not serialize field bundleStats [fix][broker] do not serialize field bundleStats Oct 24, 2022
@codelipenghui codelipenghui removed the type/cleanup Code or doc cleanups e.g. remove the outdated documentation or remove the code no longer in use label Oct 24, 2022
Comment on lines 31 to 33
/*
Ensuring that there no bundleStats field in the json string serialized from LocalBrokerData.
*/
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
/*
Ensuring that there no bundleStats field in the json string serialized from LocalBrokerData.
*/
/**
* Ensure that there is no bundleStats field in the json string serialized from LocalBrokerData.
*/

Copy link
Member Author

Choose a reason for hiding this comment

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

i found another LocalBrokerDataTest class, so i move the implementation into it.

@codecov-commenter
Copy link

codecov-commenter commented Oct 24, 2022

Codecov Report

Merging #18150 (98b9c6d) into master (6c65ca0) will increase coverage by 5.36%.
The diff coverage is 29.37%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #18150      +/-   ##
============================================
+ Coverage     34.91%   40.28%   +5.36%     
- Complexity     5707    15008    +9301     
============================================
  Files           607     1579     +972     
  Lines         53396   128710   +75314     
  Branches       5712    14152    +8440     
============================================
+ Hits          18644    51852   +33208     
- Misses        32119    71046   +38927     
- Partials       2633     5812    +3179     
Flag Coverage Δ
unittests 40.28% <29.37%> (+5.36%) ⬆️

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

Impacted Files Coverage Δ
...che/bookkeeper/mledger/impl/ManagedCursorImpl.java 73.41% <ø> (ø)
.../main/java/org/apache/pulsar/PulsarStandalone.java 0.00% <0.00%> (ø)
.../apache/pulsar/broker/admin/impl/ClustersBase.java 8.57% <0.00%> (-0.48%) ⬇️
...pache/pulsar/broker/admin/impl/NamespacesBase.java 19.85% <ø> (+5.32%) ⬆️
.../pulsar/broker/admin/impl/SchemasResourceBase.java 45.45% <0.00%> (ø)
.../org/apache/pulsar/broker/admin/v2/Namespaces.java 12.08% <0.00%> (+4.05%) ⬆️
.../pulsar/broker/service/AbstractBaseDispatcher.java 41.71% <0.00%> (-4.15%) ⬇️
...che/pulsar/broker/service/BacklogQuotaManager.java 9.09% <0.00%> (-0.40%) ⬇️
.../pulsar/broker/service/BrokerServiceException.java 31.48% <0.00%> (+6.48%) ⬆️
...ava/org/apache/pulsar/broker/service/Consumer.java 62.05% <0.00%> (+0.04%) ⬆️
... and 1120 more

@nodece nodece merged commit 6cc30c9 into apache:master Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/broker doc-not-needed Your PR changes do not impact docs ready-to-test type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicate data stored in loadbalance/brokers/
8 participants