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

[optimize][txn] Optimize transaction lowWaterMark to clean useless data faster #15592

Merged
merged 6 commits into from
May 21, 2022
Merged

[optimize][txn] Optimize transaction lowWaterMark to clean useless data faster #15592

merged 6 commits into from
May 21, 2022

Conversation

liangyepianzhou
Copy link
Contributor

Motivation

The current implementation mechanism of low water mark is to make a judgment after the end transaction, and only for the first transaction in ongoingTxns.
This makes useless data cleaning very slow.

Modification

Store lowWaterMark for tc in TB and TP.
Recursively calls lowWaterMark and cleans the data according to the stored lowWaterMarks

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

Does this pull request potentially affect one of the following parts:

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): (yes / no)
  • The public API: (yes / no)
  • The schema: (yes / no / don't know)
  • The default values of configurations: (yes / no)
  • The wire protocol: (yes / no)
  • The rest endpoints: (yes / no)
  • The admin cli options: (yes / no)
  • Anything that affects deployment: (yes / no / don't know)

Documentation

Check the box below or label this PR directly.

Need to update docs?

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

  • no-need-doc
    (Please explain why)

  • doc
    (Your PR contains doc changes)

  • doc-added
    (Docs have been already added)

…ta faster

### Motivation
The current implementation mechanism of low water mark is to make a judgment after the end transaction, and only for the first transaction in ongoingTxns.
This makes useless data cleaning very slow.
### Modification
Store lowWaterMark for tc in TB and TP.
Recursively calls lowWaterMark and cleans the data according to the stored lowWaterMarks
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label May 13, 2022
@congbobo184 congbobo184 added this to the 2.11.0 milestone May 16, 2022
@liangyepianzhou
Copy link
Contributor Author

/pulsarbot run-failure-checks

@liangyepianzhou
Copy link
Contributor Author

/pulsarbot run-failure-checks

@Technoboy- Technoboy- merged commit fcf5e14 into apache:master May 21, 2022
mattisonchao pushed a commit that referenced this pull request May 25, 2022
nicoloboschi added a commit to nicoloboschi/pulsar that referenced this pull request May 26, 2022
codelipenghui pushed a commit to codelipenghui/incubator-pulsar that referenced this pull request Jun 7, 2022
nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request Jun 7, 2022
…ta faster (apache#15592)

(cherry picked from commit fcf5e14)
(cherry picked from commit fa78cf8)
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