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][broker] fix npe when doCacheEviction #15184

Merged
merged 1 commit into from
Jun 17, 2022

Conversation

lordcheng10
Copy link
Contributor

@lordcheng10 lordcheng10 commented Apr 15, 2022

Motivation

fix npe when doCacheEviction:
image

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)

  • doc-not-needed

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Apr 15, 2022
@lordcheng10 lordcheng10 changed the title fix npe when doCacheEviction [Fix][broker] fix npe when doCacheEviction Apr 15, 2022
@lordcheng10 lordcheng10 changed the title [Fix][broker] fix npe when doCacheEviction [fix][broker] fix npe when doCacheEviction Apr 15, 2022
@HQebupt
Copy link
Contributor

HQebupt commented Apr 16, 2022

LGTM

@lordcheng10
Copy link
Contributor Author

/pulsarbot run-failure-checks

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

Can we add a test case?

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.

LGTM +1.
Could we make getEarlierReadPositionForActiveCursors and getEarlierMarkDeletedPositionForActiveCursors return Optional to avoid potential NPE?

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

Copy link
Contributor

@315157973 315157973 left a comment

Choose a reason for hiding this comment

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

Please address eolivelli‘s comment

@lordcheng10
Copy link
Contributor Author

/pulsarbot run-failure-checks

1 similar comment
@lordcheng10
Copy link
Contributor Author

/pulsarbot run-failure-checks

@lordcheng10
Copy link
Contributor Author

Can we add a test case?

Fixed! add a test method testDoCacheEviction() ,PTAL,thanks! @eolivelli

@lordcheng10 lordcheng10 force-pushed the fix_null_exception branch from 5ed1520 to 825e68c Compare May 9, 2022 16:00
@lordcheng10
Copy link
Contributor Author

/pulsarbot run-failure-checks

13 similar comments
@lordcheng10
Copy link
Contributor Author

/pulsarbot run-failure-checks

@lordcheng10
Copy link
Contributor Author

/pulsarbot run-failure-checks

@lordcheng10
Copy link
Contributor Author

/pulsarbot run-failure-checks

@lordcheng10
Copy link
Contributor Author

/pulsarbot run-failure-checks

@lordcheng10
Copy link
Contributor Author

/pulsarbot run-failure-checks

@lordcheng10
Copy link
Contributor Author

/pulsarbot run-failure-checks

@lordcheng10
Copy link
Contributor Author

/pulsarbot run-failure-checks

@lordcheng10
Copy link
Contributor Author

/pulsarbot run-failure-checks

@lordcheng10
Copy link
Contributor Author

/pulsarbot run-failure-checks

@lordcheng10
Copy link
Contributor Author

/pulsarbot run-failure-checks

@lordcheng10
Copy link
Contributor Author

/pulsarbot run-failure-checks

@lordcheng10
Copy link
Contributor Author

/pulsarbot run-failure-checks

@lordcheng10
Copy link
Contributor Author

/pulsarbot run-failure-checks

@lordcheng10
Copy link
Contributor Author

/pulsarbot run-failure-checks

5 similar comments
@lordcheng10
Copy link
Contributor Author

/pulsarbot run-failure-checks

@lordcheng10
Copy link
Contributor Author

/pulsarbot run-failure-checks

@lordcheng10
Copy link
Contributor Author

/pulsarbot run-failure-checks

@lordcheng10
Copy link
Contributor Author

/pulsarbot run-failure-checks

@lordcheng10
Copy link
Contributor Author

/pulsarbot run-failure-checks

@lordcheng10
Copy link
Contributor Author

/pulsarbot run-failure-checks

4 similar comments
@lordcheng10
Copy link
Contributor Author

/pulsarbot run-failure-checks

@lordcheng10
Copy link
Contributor Author

/pulsarbot run-failure-checks

@lordcheng10
Copy link
Contributor Author

/pulsarbot run-failure-checks

@lordcheng10
Copy link
Contributor Author

/pulsarbot run-failure-checks

@lordcheng10
Copy link
Contributor Author

@aloyszhang PTAL,thank!

@aloyszhang aloyszhang merged commit e685742 into apache:master Jun 17, 2022
@codelipenghui codelipenghui added this to the 2.11.0 milestone Jun 17, 2022
@mattisonchao
Copy link
Member

Hi, @lordcheng10
It looks like do not affect branch 2.9. Could you help to confirm it?

nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request Jul 7, 2022
nicoloboschi added a commit to datastax/pulsar that referenced this pull request Jul 8, 2022
nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request Jul 8, 2022
@Jason918
Copy link
Contributor

This does not affect branch-2.10, remove 'release/2.10.2'

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 type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants