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] [cli] the variable producerName of BatchMsgContainer is null #20819

Merged

Conversation

poorbarcode
Copy link
Contributor

Motivation

If the producer name is generated by the Broker, the producer will update the variable producerName after connecting, but not update the same variable of the batch message container.

Modifications

  • fix bug
  • add a debug log of batch messages send in the client library.

Documentation

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

Matching PR in forked repository

PR in forked repository: x

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Jul 16, 2023
@poorbarcode poorbarcode self-assigned this Jul 16, 2023
@poorbarcode poorbarcode added this to the 3.1.0 milestone Jul 16, 2023
@poorbarcode
Copy link
Contributor Author

/pulsarbot rerun-failure-checks

@@ -304,6 +304,13 @@ public OpSendMsg createOpSendMsg() throws IOException {
ByteBufPair cmd = producer.sendMessage(producer.producerId, messageMetadata.getSequenceId(),
messageMetadata.getHighestSequenceId(), numMessagesInBatch, messageMetadata, encryptedPayload);

if (log.isInfoEnabled()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe using the debug level is much better.

@codecov-commenter
Copy link

Codecov Report

Merging #20819 (400b6e5) into master (b05f436) will decrease coverage by 0.07%.
The diff coverage is 35.71%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #20819      +/-   ##
============================================
- Coverage     73.19%   73.12%   -0.08%     
+ Complexity    32185    32175      -10     
============================================
  Files          1867     1868       +1     
  Lines        139071   139159      +88     
  Branches      15305    15314       +9     
============================================
- Hits         101795   101762      -33     
- Misses        29234    29336     +102     
- Partials       8042     8061      +19     
Flag Coverage Δ
inttests 24.18% <35.71%> (-0.09%) ⬇️
systests 25.18% <35.71%> (+<0.01%) ⬆️
unittests 72.41% <35.71%> (-0.05%) ⬇️

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

Impacted Files Coverage Δ
...va/org/apache/pulsar/broker/service/ServerCnx.java 71.13% <0.00%> (-0.14%) ⬇️
...sar/client/impl/AbstractBatchMessageContainer.java 75.67% <ø> (-0.65%) ⬇️
...sar/client/impl/BatchMessageKeyBasedContainer.java 63.82% <0.00%> (ø)
.../pulsar/client/impl/BatchMessageContainerImpl.java 83.90% <50.00%> (-0.03%) ⬇️

... and 77 files with indirect coverage changes

@poorbarcode poorbarcode merged commit aba50f2 into apache:master Jul 18, 2023
poorbarcode added a commit that referenced this pull request Jul 18, 2023
…20819)

Motivation: If the producer name is generated by the Broker, the producer will update the variable `producerName` after connecting, but not update the same variable of the batch message container.

Modifications: fix bug
(cherry picked from commit aba50f2)
poorbarcode added a commit that referenced this pull request Jul 18, 2023
…20819)

Motivation: If the producer name is generated by the Broker, the producer will update the variable `producerName` after connecting, but not update the same variable of the batch message container.

Modifications: fix bug
(cherry picked from commit aba50f2)
poorbarcode added a commit that referenced this pull request Jul 18, 2023
…20819)

Motivation: If the producer name is generated by the Broker, the producer will update the variable `producerName` after connecting, but not update the same variable of the batch message container.

Modifications: fix bug
(cherry picked from commit aba50f2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants