-
Notifications
You must be signed in to change notification settings - Fork 163
[#1428] fix(server): fallback invalid when local storage can't write #1429
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
Conversation
…ld to avoid event being discarded
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1429 +/- ##
============================================
+ Coverage 53.38% 54.64% +1.26%
+ Complexity 2729 2240 -489
============================================
Files 422 346 -76
Lines 24046 15606 -8440
Branches 2051 1431 -620
============================================
- Hits 12836 8528 -4308
+ Misses 10412 6601 -3811
+ Partials 798 477 -321 ☔ View full report in Codecov by Sentry. |
|
I can't get the point of this pr. |
Please see the test case |
|
cc @xianjingfeng If you have time, could you help review this ? |
| .checkValue( | ||
| ConfigUtils.NON_NEGATIVE_LONG_VALIDATOR, " fallback times must be non-negative") | ||
| .defaultValue(0L) | ||
| .defaultValue(-1L) |
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.
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.
SGTM.
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.
Ok for me.
| public static final ConfigOption<Long> FALLBACK_MAX_FAIL_TIMES = | ||
| ConfigOptions.key("rss.server.hybrid.storage.fallback.max.fail.times") | ||
| .longType() | ||
| .checkValue( |
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.
The negative check is unnecessary
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.
Why do we remove this check?
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.
if -1,it means we could fallback directly once failed at the first time.
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.
What about the behaviour of 0?
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.
For the first time fallback, it will reject for 0
|
PTAL again @xianjingfeng |
xianjingfeng
left a comment
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.
LGTM
|
Merged. Thanks @xianjingfeng @jerqi |
What changes were proposed in this pull request?
allow specifying negative fallback threshold to avoid event being discarded
Why are the changes needed?
Fix: #1428
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Unit tests