-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 the bug where uploaded segments cannot be deleted on real-time table #9579
Fix the bug where uploaded segments cannot be deleted on real-time table #9579
Conversation
Codecov Report
@@ Coverage Diff @@
## master #9579 +/- ##
=============================================
+ Coverage 26.03% 63.85% +37.82%
- Complexity 44 5240 +5196
=============================================
Files 1922 1881 -41
Lines 102937 100962 -1975
Branches 15657 15419 -238
=============================================
+ Hits 26796 64469 +37673
+ Misses 73435 31768 -41667
- Partials 2706 4725 +2019
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. 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.
lgtm overall.
one observation is ControllerRequestClient doesn't have unit test. good to add one
// Test dropping all segments one by one | ||
List<String> segments = listSegments(realtimeTableName); | ||
assertFalse(segments.isEmpty()); | ||
for (String segment : segments) { | ||
dropSegment(realtimeTableName, segment); | ||
} | ||
// NOTE: There is a delay to remove the segment from property store | ||
TestUtils.waitForCondition((aVoid) -> { | ||
try { | ||
return listSegments(realtimeTableName).isEmpty(); | ||
} catch (IOException e) { | ||
throw new RuntimeException(e); | ||
} | ||
}, 60_000L, "Failed to drop the segments"); |
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.
nit, why is this test during tearDown?
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 part of the tear-down process. OfflineClusterIntegrationTest
has similar test. We may consider adding dependency to the test so that we can move it into a test, but prefer doing it separately
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.
yeah good enough for now we can follow up
Related to #8283
Since we added the support of uploading segments to real-time table, we cannot always derive the table type from the segment name. When the provided table name has the type suffix, do not try to derive the table type from the segment name.