-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Refactoring the upsert compaction related code #12275
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
b8618c6 to
e176928
Compare
|
@robertzych Can you take a look at this? |
e176928 to
4d4bb48
Compare
1. Fix the issue with fetching validDocId metadata for table with a large number of segments. (Added POST API with list of segments to be part of the request body) 2. Added POST support for MultiHttpRequest to cover 1. 3. Added GET /tables/<tableName>/validDocIdMetadata API on the controller for improving debuggability.
4d4bb48 to
9d0b2df
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #12275 +/- ##
============================================
+ Coverage 61.50% 61.53% +0.02%
- Complexity 207 1153 +946
============================================
Files 2416 2417 +1
Lines 131179 131406 +227
Branches 20246 20269 +23
============================================
+ Hits 80686 80862 +176
- Misses 44595 44626 +31
- Partials 5898 5918 +20
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
| + "aggregate valid doc id metadata of all segments for a table") | ||
| public String getTableAggregateValidDocIdMetadata( | ||
| @ApiParam(value = "Name of the table", required = true) @PathParam("tableName") String tableName, | ||
| @ApiParam(value = "OFFLINE|REALTIME") @QueryParam("type") String tableTypeStr) { |
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 table type should always be REALTIME as this API makes sense only for upsert tables. Should we just remove this from request?
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.
@tibrewalpratik17 Currently, I return the error when the table is OFFLINE. In the future, we may want to support upsert in the offline table. We can use this flag once we support this. I'm trying to follow the convention in this class to make the API look similar as other ones.
| @Produces(MediaType.APPLICATION_JSON) | ||
| @ApiOperation(value = "Get the aggregate valid doc id metadata of all segments for a table", notes = "Get the " | ||
| + "aggregate valid doc id metadata of all segments for a table") | ||
| public String getTableAggregateValidDocIdMetadata( |
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.
Can we also add an optional list of segmentNames in the API request? This will be ideal for tables with a lot of 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.
added segment names to the api param
robertzych
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.
Thank you!
swaminathanmanish
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 otherwise. Thanks for factoring out the UpsertCompactionReader as well.
...t-controller/src/main/java/org/apache/pinot/controller/util/ServerSegmentMetadataReader.java
Outdated
Show resolved
Hide resolved
...t-controller/src/main/java/org/apache/pinot/controller/util/ServerSegmentMetadataReader.java
Outdated
Show resolved
Hide resolved
...t-controller/src/main/java/org/apache/pinot/controller/util/ServerSegmentMetadataReader.java
Show resolved
Hide resolved
...t-controller/src/main/java/org/apache/pinot/controller/util/ServerSegmentMetadataReader.java
Outdated
Show resolved
Hide resolved
57709f6 to
313d531
Compare
313d531 to
4156f04
Compare
* Refactoring the upsert compaction related code 1. Fix the issue with fetching validDocId metadata for table with a large number of segments. (Added POST API with list of segments to be part of the request body) 2. Added POST support for MultiHttpRequest to cover 1. 3. Added GET /tables/<tableName>/validDocIdMetadata API on the controller for improving debuggability. * Addressing comments
Uh oh!
There was an error while loading. Please reload this page.