Add excludeReplacedSegments param into table metadata API
- Dominant language
- Java
- Stars
- 6.1k
- Forks
- 1.5k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 189
Description
`/tables/{tableName}/metadata` endpoint should take an additional parameter such as `excludeReplacedSegments` as found in [getSegments](https://github.com/apache/pinot/blob/master/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentRestletResource.java#L199) in order to discern between reporting stats with consistent push accounted for or not.
Currently, the table returns `TableMetadata` with info such as `diskSizeInBytes`, `numSegments` and `numRows` approximately doubled _**when consistent push is in-place**_, and users who are unaware of the consistent push concept may incorrectly interpret the result, e.g. leading to provisioning 2x the storage by mistake.
This should be done in a backward compatible manner, with the default behavior being the current one if the additional param is not explicitly set.
Contributor guide
Assessment
This issue has not been assessed yet.