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

[cleanup][broker] Fix PersistentSubscription duplicate implementation interface Subscription #22359

Conversation

sherlock-lin
Copy link
Contributor

@sherlock-lin sherlock-lin commented Mar 26, 2024

…ation interface Subscription

Fixes #22354

Main Issue: #xyz

PIP: #xyz

Motivation

Modifications

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 the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

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

Matching PR in forked repository

PR in forked repository:

@Technoboy- Technoboy- added this to the 3.3.0 milestone Mar 26, 2024
@Technoboy- Technoboy- changed the title [fix][broker][master] PersistentSubscription duplicate implement… [fix][broker] Fix PersistentSubscription duplicate implementation interface Subscription Mar 26, 2024
@sherlock-lin sherlock-lin force-pushed the fix-duplicate-implementation-subscription-master branch from cf0852b to b0269ba Compare March 26, 2024 13:05
Copy link
Member

@dao-jun dao-jun left a comment

Choose a reason for hiding this comment

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

lgtm

@liangyuanpeng
Copy link
Contributor

/pulsarbot rerun-failure-checks

@sherlock-lin
Copy link
Contributor Author

/pulsarbot rerun-failure-checks

What should I do please, I haven't changed the file that failed detection

@liangyuanpeng
Copy link
Contributor

@lhotari
Copy link
Member

lhotari commented Mar 27, 2024

This isn't a real problem at all. In the Pulsar code base, we currently try to minimize unnecessary changes. This might change after we move to a different type of maintenance strategy, the dev mailing list discussion is https://lists.apache.org/thread/j6qvt45rndnvjypcmqxsfmddqt41bxjv . Refactorings aren't currently mentioned there explicitly.

@lhotari
Copy link
Member

lhotari commented Mar 27, 2024

Just to say that it's better to not create a lot of similar PRs since that would be a lot of changes which don't provide real value. We have a lot of technical debt with more important, but low value areas such as compiler warnings. There's a lot of compiler warnings when compiling Pulsar. We have chosen to ignore them for now. I hope this could change after we have a better maintenance strategy in place.

@Technoboy-
Copy link
Contributor

This isn't a real problem at all. In the Pulsar code base, we currently try to minimize unnecessary changes. This might change after we move to a different type of maintenance strategy, the dev mailing list discussion is https://lists.apache.org/thread/j6qvt45rndnvjypcmqxsfmddqt41bxjv . Refactorings aren't currently mentioned there explicitly.

I don't agree with you for this patch. This isn't a problem, but from the Java interface definition, it's better to do like this.

@Technoboy-
Copy link
Contributor

Just to say that it's better to not create a lot of similar PRs since that would be a lot of changes which don't provide real value. We have a lot of technical debt with more important, but low value areas such as compiler warnings. There's a lot of compiler warnings when compiling Pulsar. We have chosen to ignore them for now. I hope this could change after we have a better maintenance strategy in place.

we can close other patch that not for master branch

@Technoboy- Technoboy- closed this Mar 27, 2024
@Technoboy- Technoboy- reopened this Mar 27, 2024
@lhotari
Copy link
Member

lhotari commented Mar 27, 2024

I don't agree with you for this patch. This isn't a problem, but from the Java interface definition, it's better to do like this.

@Technoboy- I agree that it is "better". When something is "better", this implies that it produces some benefit. In this case, what is it that it makes better? The question is then whether this benefit is relevant when we are considering how Pulsar is currently maintained. I've provided my opinion about formatting changes in this mailing list post: https://lists.apache.org/thread/lo15cdzsl740dwgcqwpsl9oy9qb13onv . After we settle on a maintenance strategy that reduces merge conflicts for maintaining the LTS branch, we have more freedom to do refactorings which we are currently avoiding because of the merge conflicts. Merge conflicts caused by unnecessary changes are the main reason for my resistance. That could be resolved with an improved maintenance strategy.

@sherlock-lin
Copy link
Contributor Author

This is my first pr, if the merge in can give me more confidence, I'll try to avoid mentioning low value pr taking up resources until the technical debt clears up.

Copy link
Contributor

@codelipenghui codelipenghui left a comment

Choose a reason for hiding this comment

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

+1 for merging this PR, but it's better to change the title to "[cleanup][broker] xxx".

And I don't think it will introduce more issues for cherry-picking. Cleanup is also welcome.
Let's run case by case.

@Technoboy-
Copy link
Contributor

This is my first pr, if the merge in can give me more confidence, I'll try to avoid mentioning low value pr taking up resources until the technical debt clears up.

Yes, we know. Thanks

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.63%. Comparing base (bbc6224) to head (fcde506).
Report is 99 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #22359      +/-   ##
============================================
+ Coverage     73.57%   73.63%   +0.06%     
+ Complexity    32624    32125     -499     
============================================
  Files          1877     1879       +2     
  Lines        139502   140277     +775     
  Branches      15299    15571     +272     
============================================
+ Hits         102638   103299     +661     
- Misses        28908    28967      +59     
- Partials       7956     8011      +55     
Flag Coverage Δ
inttests 27.28% <ø> (+2.69%) ⬆️
systests 24.62% <ø> (+0.30%) ⬆️
unittests 72.88% <ø> (+0.03%) ⬆️

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

Files Coverage Δ
...rvice/nonpersistent/NonPersistentSubscription.java 53.27% <ø> (ø)
...ker/service/persistent/PersistentSubscription.java 76.72% <ø> (+0.03%) ⬆️

... and 150 files with indirect coverage changes

@Technoboy- Technoboy- merged commit 6f9c8e7 into apache:master Mar 28, 2024
98 of 100 checks passed
@lhotari
Copy link
Member

lhotari commented Mar 28, 2024

This is my first pr, if the merge in can give me more confidence, I'll try to avoid mentioning low value pr taking up resources until the technical debt clears up.

@sherlock-lin Congrats for the first PR and welcome to join the Pulsar contributors! For the purpose of getting familiar to how PRs are merged and how the Pulsar CI works, this PR was a great way to learn that.

You might notice in future PRs that we have quite a few flaky tests in Pulsar CI and usually there will be multiple flakes and the build will have to be retried multiple times. For this PR, you hadn't yet tried out the "Personal CI" option for running PR builds in your own fork to get build feedback. That's useful to learn since you can retry failing builds as you like in your own fork and prepare the PR for final review. The guide is missing some details since you will have to enable GitHub Actions in your Pulsar fork. Contributions to the instructions are also welcome if you notice any gaps.

I'm sorry about the criticism about this PR. I got stuck on the detail that this PR isn't a bug fix, but a code cleanup PR and ended up explaining more details why I'm not eager to encourage to do more code cleanup PRs before we have changed the Pulsar maintenance strategy (#22359 (comment)).

We have plenty of valuable contribution opportunies in the Apache Pulsar project. Please join the Apache Pulsar Slack and it's #dev channel. When you are looking for contribution opportunies, I'll be happy to suggest valuable opportunies for you and help with any barriers for contributions.

/cc @Technoboy- @codelipenghui

@sherlock-lin
Copy link
Contributor Author

This is my first pr, if the merge in can give me more confidence, I'll try to avoid mentioning low value pr taking up resources until the technical debt clears up.

@sherlock-lin Congrats for the first PR and welcome to join the Pulsar contributors! For the purpose of getting familiar to how PRs are merged and how the Pulsar CI works, this PR was a great way to learn that.

You might notice in future PRs that we have quite a few flaky tests in Pulsar CI and usually there will be multiple flakes and the build will have to be retried multiple times. For this PR, you hadn't yet tried out the "Personal CI" option for running PR builds in your own fork to get build feedback. That's useful to learn since you can retry failing builds as you like in your own fork and prepare the PR for final review. The guide is missing some details since you will have to enable GitHub Actions in your Pulsar fork. Contributions to the instructions are also welcome if you notice any gaps.

I'm sorry about the criticism about this PR. I got stuck on the detail that this PR isn't a bug fix, but a code cleanup PR and ended up explaining more details why I'm not eager to encourage to do more code cleanup PRs before we have changed the Pulsar maintenance strategy (#22359 (comment)).

We have plenty of valuable contribution opportunies in the Apache Pulsar project. Please join the Apache Pulsar Slack and it's #dev channel. When you are looking for contribution opportunies, I'll be happy to suggest valuable opportunies for you and help with any barriers for contributions.

/cc @Technoboy- @codelipenghui

Thanks @lhotari for your patient guidance! in this PR submission I have irregularities thanks for pointing out.

in this process I have learned a lot about contributing code knowledge, I will learn more about submitting pr specification knowledge to improve efficiency!

Also thanks to @Technoboy- @codecov-commenter @liangyuanpeng and other partners for their guidance and help. I'm honored to be able to join Pulsar contributors with everybody to make Pulsar better!

@sherlock-lin sherlock-lin changed the title [fix][broker] Fix PersistentSubscription duplicate implementation interface Subscription [cleanup][broker] Fix PersistentSubscription duplicate implementation interface Subscription Mar 28, 2024
@sherlock-lin sherlock-lin deleted the fix-duplicate-implementation-subscription-master branch March 29, 2024 02:42
Technoboy- pushed a commit to Technoboy-/pulsar that referenced this pull request Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-not-needed Your PR changes do not impact docs ready-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Cleanup] PersistentSubscription duplicate implementation interface Subscription
7 participants