apache / apache/pinot

Add excludeReplacedSegments param into table metadata API

Open
#10,244 2 comments 1 reaction 1 assignee Claimed by @yuanbenson View on GitHub
good first issue
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.