Merged
Conversation
Signed-off-by: Carpenter Lee <hooleeucas@163.com>
Signed-off-by: Carpenter Lee <hooleeucas@163.com>
Signed-off-by: Carpenter Lee <hooleeucas@163.com>
Codecov Report
@@ Coverage Diff @@
## master #331 +/- ##
============================================
+ Coverage 38.33% 38.42% +0.08%
- Complexity 934 937 +3
============================================
Files 218 218
Lines 6925 6935 +10
Branches 941 942 +1
============================================
+ Hits 2655 2665 +10
- Misses 3932 3933 +1
+ Partials 338 337 -1
Continue to review full report at Codecov.
|
sczyh30
pushed a commit
that referenced
this pull request
Dec 25, 2018
* Fix #330 : fix listMetricFiles() returns wrong file name list. Signed-off-by: Carpenter Lee <hooleeucas@163.com> * Add timestamp check when read metrics. Signed-off-by: Carpenter Lee <hooleeucas@163.com> * Refine test case Signed-off-by: Carpenter Lee <hooleeucas@163.com>
Arlmls
pushed a commit
to Arlmls/Sentinel
that referenced
this pull request
Jan 8, 2019
* Fix alibaba#330 : fix listMetricFiles() returns wrong file name list. Signed-off-by: Carpenter Lee <hooleeucas@163.com> * Add timestamp check when read metrics. Signed-off-by: Carpenter Lee <hooleeucas@163.com> * Refine test case Signed-off-by: Carpenter Lee <hooleeucas@163.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe what this PR does / why we need it
MetricWriter#listMetricFiles()method is used for listing all metric files of the specific app. It usesString.contains()to search the metric file name instead of whole matching, this will lead wrong file reading when appName contains some other one, for example one appName is simple-Sentinel-SDK-Demo, the other is Sentinel-SDK-Demo, the former app's metric file will appearing in the latter metric files list.MetricWriter#listMetricFiles()should return right metric files name list.Does this pull request fix one issue?
Fixes #330
Describe how you did it
Use whole string matching instead of
String.contains()to filter app metric file name.Describe how to verify it
Run test cases.
Special notes for reviews