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][txn] Always send correct transaction id in end txn response #19137

Merged
merged 5 commits into from
Jan 10, 2023

Conversation

nicoloboschi
Copy link
Contributor

@nicoloboschi nicoloboschi commented Jan 5, 2023

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
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
Copy link
Contributor

@congbobo184 congbobo184 left a comment

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
Contributor Author

its better to add test for it

Added, thanks.

@codecov-commenter
Copy link

Codecov Report

Merging #19137 (8636d90) into master (4b8f447) will increase coverage by 2.82%.
The diff coverage is 13.04%.

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.

Impacted Files Coverage Δ
...va/org/apache/pulsar/broker/service/ServerCnx.java 50.64% <5.00%> (+2.46%) ⬆️
...pulsar/broker/service/PulsarCommandSenderImpl.java 74.11% <66.66%> (+0.64%) ⬆️
...rvice/schema/KeyValueSchemaCompatibilityCheck.java 21.62% <0.00%> (-45.95%) ⬇️
...r/service/AbstractDispatcherMultipleConsumers.java 56.45% <0.00%> (-9.68%) ⬇️
.../org/apache/pulsar/broker/admin/AdminResource.java 64.61% <0.00%> (-0.92%) ⬇️
...oker/service/schema/SchemaRegistryServiceImpl.java 65.31% <0.00%> (-0.87%) ⬇️
...rg/apache/pulsar/broker/service/AbstractTopic.java 65.06% <0.00%> (-0.15%) ⬇️
...che/bookkeeper/mledger/impl/ManagedLedgerImpl.java 53.76% <0.00%> (-0.05%) ⬇️
...ulsar/client/impl/TransactionMetaStoreHandler.java
...va/org/apache/pulsar/client/impl/ConsumerBase.java
... and 282 more

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