-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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] change name limitTime to limitTimeInSec #19053
Conversation
@StevenLuMT Please add the following content to your PR description and select a checkbox:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. LGTM
Codecov Report
@@ Coverage Diff @@
## master #19053 +/- ##
============================================
- Coverage 47.19% 45.05% -2.15%
- Complexity 10643 10826 +183
============================================
Files 709 769 +60
Lines 69421 74178 +4757
Branches 7449 7982 +533
============================================
+ Hits 32766 33421 +655
- Misses 32986 36986 +4000
- Partials 3669 3771 +102
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Co-authored-by: lushiji <lushiji@didiglobal.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yuruguo @StevenLuMT - this is a breaking change without accounting for backwards compatibility. We either need to revert this or do something like #13291 (I haven't looked closely at that PR, but I think it is the right reference).
Note that this type of API change is technically supposed to go through the PIP process.
This type of change has far reaching implications for clients, too, so there must be new documentation for the change.
Let me know how you'd like to proceed.
@@ -80,12 +80,12 @@ public void setLimitSize(long limitSize) { | |||
this.limit = limitSize; | |||
} | |||
|
|||
public int getLimitTime() { | |||
return limitTime; | |||
public int getLimitTimeInSec() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a breaking change without any backwards compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better to revert this change and instead focus on improving documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with that approach. There are many names in Pulsar that are slightly confusing. It'd make more sense to define a paradigm for naming before making many one-off changes.
Reverting with #19152. I support working to improve the clarify of our names, but we need to be careful not to break any deployments. |
@StevenLuMT The right way is to keep compatibility, you can take the old
|
Motivation
limitTime It's a confusing name, without the time unit, it is easy to cause bugs,
so we should deprecate the old name limitTime and introduce a new one limitTimeInSec
Modifications
change name limitTime to limitTimeInSec
Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
Check the box below or label this PR directly.
Need to update docs?
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: StevenLuMT#1