pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

[improve][cli] PIP-353: Improve transaction message visibility for peek-message

Open shibd opened this issue 1 year ago • 1 comments

Motivation

#22746

Modifications

  • Support --show-server-marker and --show-txn-aborted, --show-txn-uncommitted flags for peek-messages cmd.

Verifying this change

  • Add testPeekMessageForSkipTxnMarker, testPeekMessageForSkipAbortedAndUnCommittedMessages and testPeekMessageForShowAllMessages unit test to corver this change.

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
  • [x] The admin CLI options
  • [ ] The metrics
  • [ ] Anything that affects deployment

Documentation

  • [ ] doc
  • [ ] doc-required
  • [x] doc-not-needed
  • [ ] doc-complete

Matching PR in forked repository

PR in forked repository: https://github.com/shibd/pulsar/pull/34

shibd avatar May 22 '24 13:05 shibd

Codecov Report

Attention: Patch coverage is 88.46154% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 73.19%. Comparing base (bbc6224) to head (b158ff1). Report is 310 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #22762      +/-   ##
============================================
- Coverage     73.57%   73.19%   -0.39%     
+ Complexity    32624    32599      -25     
============================================
  Files          1877     1891      +14     
  Lines        139502   141537    +2035     
  Branches      15299    15536     +237     
============================================
+ Hits         102638   103591     +953     
- Misses        28908    29933    +1025     
- Partials       7956     8013      +57     
Flag Coverage Δ
inttests 27.41% <0.00%> (+2.82%) :arrow_up:
systests 24.77% <0.00%> (+0.44%) :arrow_up:
unittests 72.19% <88.46%> (-0.66%) :arrow_down:

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

Files Coverage Δ
...e/pulsar/client/api/TransactionIsolationLevel.java 100.00% <100.00%> (ø)
...pulsar/broker/admin/impl/PersistentTopicsBase.java 69.48% <94.44%> (+4.03%) :arrow_up:
...in/java/org/apache/pulsar/client/admin/Topics.java 76.19% <50.00%> (-1.31%) :arrow_down:
...pache/pulsar/client/admin/internal/TopicsImpl.java 83.44% <95.65%> (+1.43%) :arrow_up:
...in/java/org/apache/pulsar/admin/cli/CmdTopics.java 79.98% <50.00%> (-1.20%) :arrow_down:

... and 361 files with indirect coverage changes

codecov-commenter avatar May 23 '24 00:05 codecov-commenter

I will cherry-pick this to branch-3.0 and branch-3.3, Although it introduces a new configuration(--transaction-isolation-level and --show-server-marker) on admin CLI, it fixes the incorrect behavior by default when this configuration is not used.

shibd avatar May 28 '24 04:05 shibd