Skip to content

[improve][broker] Optimize the log printing of PulsarService - #18244

Merged
AnonHxy merged 2 commits into
apache:masterfrom
Pomelongan:update_PulsarService
Oct 31, 2022
Merged

AnonHxy merged 2 commits into
apache:masterfrom
Pomelongan:update_PulsarService

Conversation

@Pomelongan

Copy link
Copy Markdown
Contributor

Motivation

In org.apache.pulsar.broker.PulsarService#start, two log printing can be combined into one line.

LOG.info("messaging service is ready, bootstrap_seconds={}", bootstrapTimeSeconds);
LOG.info("messaging service is ready, {}, cluster={}, configs={}", bootstrapMessage,
config.getClusterName(), config);

Modifications

Combine the two log lines in the org.apache.pulsar.broker.PulsarService#start into one line.

Verifying this change

  • Make sure that the change passes the CI checks.

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

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 binary protocol
  • The REST endpoints
  • The admin CLI options
  • Anything that affects deployment

Documentation

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

Matching PR in forked repository

PR in forked repository: Pomelongan#11

@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Oct 28, 2022
LOG.info("messaging service is ready, bootstrap_seconds={}", bootstrapTimeSeconds);
LOG.info("messaging service is ready, {}, cluster={}, configs={}", bootstrapMessage,
config.getClusterName(), config);
LOG.info("messaging service is ready, {}, cluster={}, configs={}, bootstrap_seconds={}", bootstrapMessage,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's better move the bootstrap_seconds to first position, because the configs will be very long

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@codelipenghui @AnonHxy I have updated, PTAL.

@AnonHxy AnonHxy changed the title [improve][broker]optimize the log printing logic of PulsarService [improve][broker] Optimize the log printing of PulsarService Oct 29, 2022
@AnonHxy AnonHxy added the type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages label Oct 29, 2022
@AnonHxy AnonHxy added this to the 2.12.0 milestone Oct 29, 2022
@Pomelongan
Pomelongan force-pushed the update_PulsarService branch from 2ec2dbf to 75e867a Compare October 29, 2022 08:45
@codecov-commenter

codecov-commenter commented Oct 31, 2022 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 38.56%. Comparing base (46c0438) to head (75e867a).
⚠️ Report is 3411 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #18244      +/-   ##
============================================
- Coverage     38.84%   38.56%   -0.29%     
+ Complexity     8286     8241      -45     
============================================
  Files           683      683              
  Lines         67323    67316       -7     
  Branches       7215     7215              
============================================
- Hits          26152    25959     -193     
- Misses        38210    38390     +180     
- Partials       2961     2967       +6     
Flag Coverage Δ
unittests 38.56% <100.00%> (-0.29%) ⬇️

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

Files with missing lines Coverage Δ
...n/java/org/apache/pulsar/broker/PulsarService.java 57.14% <100.00%> (-0.74%) ⬇️

... and 47 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@AnonHxy
AnonHxy merged commit f029757 into apache:master Oct 31, 2022
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 type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants