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

[feat][broker][PIP-195] Support internal cursor properties - part4 #17712

Merged

Conversation

coderzc
Copy link
Member

@coderzc coderzc commented Sep 19, 2022

Master Issue: #16763

Motivation

Now, the cursor properties support overall update and modifying a single value concurrently by #17164, but setCursorProperties will all key-value is removed before update properties, this will cause internal property loss, so use a special prefix to prevent internal properties.

More context see: #17164 (comment), #17164 (comment), #17164 (comment)

Modifications

Use a special prefix to prevent internal properties.

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

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

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

Documentation

  • doc-required
    (Your PR needs to update docs and you will update later)

  • doc-not-needed
    (Please explain why)

  • doc
    (Your PR contains doc changes)

  • doc-complete
    (Docs have been already added)

Matching PR in forked repository
PR in forked repository: coderzc#4

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Sep 19, 2022
@coderzc coderzc force-pushed the support_internal_cursor_properties branch 2 times, most recently from 1b66fbd to a010aa7 Compare September 19, 2022 04:57
@lhotari
Copy link
Member

lhotari commented Sep 19, 2022

the tests failed in Broker Group 3 because of OOM, I filed #17714 . It's most likely not caused by the changes in this PR.

@coderzc coderzc force-pushed the support_internal_cursor_properties branch from a010aa7 to 5f60f6d Compare September 21, 2022 02:20
@github-actions
Copy link

The pr had no activity for 30 days, mark with Stale label.

@github-actions github-actions bot added the Stale label Oct 22, 2022
@coderzc
Copy link
Member Author

coderzc commented Nov 3, 2022

Copy link
Member

@mattisonchao mattisonchao left a comment

Choose a reason for hiding this comment

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

It appears to have a minor compatibility issue - if the user has previously used a format like CURSOR_INTERNAL_PROPERTY_PREFIX in cursor properties. I think it's a small probability event though.

@codecov-commenter
Copy link

codecov-commenter commented Nov 7, 2022

Codecov Report

Merging #17712 (f01a4d4) into master (a2c1534) will increase coverage by 0.68%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #17712      +/-   ##
============================================
+ Coverage     47.23%   47.91%   +0.68%     
+ Complexity    10430     9349    -1081     
============================================
  Files           692      613      -79     
  Lines         67766    58391    -9375     
  Branches       7260     6087    -1173     
============================================
- Hits          32009    27978    -4031     
+ Misses        32192    27379    -4813     
+ Partials       3565     3034     -531     
Flag Coverage Δ
unittests 47.91% <100.00%> (+0.68%) ⬆️

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

Impacted Files Coverage Δ
...ava/org/apache/pulsar/broker/service/Consumer.java 69.57% <100.00%> (-2.60%) ⬇️
...apache/pulsar/client/impl/AutoClusterFailover.java 70.00% <0.00%> (-6.12%) ⬇️
...oker/service/schema/SchemaRegistryServiceImpl.java 59.45% <0.00%> (-5.41%) ⬇️
...ction/buffer/impl/TransactionBufferClientImpl.java 76.74% <0.00%> (-4.66%) ⬇️
.../buffer/impl/TransactionBufferClientStatsImpl.java 82.00% <0.00%> (-4.00%) ⬇️
...pulsar/broker/TransactionMetadataStoreService.java 58.51% <0.00%> (-3.94%) ⬇️
...tion/buffer/impl/TransactionBufferHandlerImpl.java 50.00% <0.00%> (-2.54%) ⬇️
...tent/PersistentDispatcherSingleActiveConsumer.java 54.85% <0.00%> (-1.89%) ⬇️
...ervice/AbstractDispatcherSingleActiveConsumer.java 69.15% <0.00%> (-1.87%) ⬇️
... and 100 more

@coderzc
Copy link
Member Author

coderzc commented Nov 8, 2022

Copy link
Contributor

@Jason918 Jason918 left a comment

Choose a reason for hiding this comment

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

LGTM

@coderzc coderzc added the type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages label Nov 21, 2022
@codelipenghui codelipenghui merged commit 4ac9305 into apache:master Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/broker 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.

6 participants