Skip to content

[fix][txn] Always send correct transaction id in end txn response - #19137

Merged
Technoboy- merged 5 commits into
apache:masterfrom
nicoloboschi:txn-response-end
Jan 10, 2023
Merged

[fix][txn] Always send correct transaction id in end txn response#19137
Technoboy- merged 5 commits into
apache:masterfrom
nicoloboschi:txn-response-end

Conversation

@nicoloboschi

@nicoloboschi nicoloboschi commented Jan 5, 2023

Copy link
Copy Markdown
Contributor

Motivation

When the broker sends the transaction end response which has failed, the least sig bits is not included in the response payload. This also applies to other txn methods.
This is not a big deal since the java client only uses it for debug logging.

However, thanks to #14613, it's possible to intercept this response payload so it's better to pass the correct value.

Modifications

  • Set TxnidLeastBits in txn response payloads

Verifying this change

  • Make sure that the change passes the CI checks.

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

Documentation

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

@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Jan 5, 2023
@nicoloboschi

Copy link
Copy Markdown
Contributor Author

FYI @madhavan-narayanan since you implemented the interceptor

@nicoloboschi nicoloboschi added this to the 2.12.0 milestone Jan 5, 2023
@nicoloboschi
nicoloboschi requested review from liangyepianzhou and mattisonchao and removed request for liangyepianzhou January 5, 2023 09:37

@congbobo184 congbobo184 left a comment

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.

its better to add test for it

@nicoloboschi

Copy link
Copy Markdown
Contributor Author

its better to add test for it

Added, thanks.

@codecov-commenter

codecov-commenter commented Jan 10, 2023

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 13.04348% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.82%. Comparing base (4b8f447) to head (8636d90).
⚠️ Report is 3033 commits behind head on master.

Files with missing lines Patch % Lines
...va/org/apache/pulsar/broker/service/ServerCnx.java 5.00% 19 Missing ⚠️
...pulsar/broker/service/PulsarCommandSenderImpl.java 66.66% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #19137      +/-   ##
============================================
+ Coverage     47.00%   49.82%   +2.82%     
+ Complexity    10639     8421    -2218     
============================================
  Files           713      478     -235     
  Lines         69672    53000   -16672     
  Branches       7482     5663    -1819     
============================================
- Hits          32746    26405    -6341     
+ Misses        33212    23642    -9570     
+ Partials       3714     2953     -761     
Flag Coverage Δ
unittests 49.82% <13.04%> (+2.82%) ⬆️

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

Files with missing lines Coverage Δ
...pulsar/broker/service/PulsarCommandSenderImpl.java 74.11% <66.66%> (+0.64%) ⬆️
...va/org/apache/pulsar/broker/service/ServerCnx.java 50.64% <5.00%> (+2.46%) ⬆️

... and 288 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.

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