apache / apache/pinot

Controller's `/segments/<tableName>/metadata` does not return metadata from all segments of the table

Open
#7,151 7 comments 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
Java
Stars
6.1k
Forks
1.5k
Avg merge
1d 21h
Merged PRs (30d)
189

Description

**Following Slack discussion:** https://apache-pinot.slack.com/archives/C011C9JHN7R/p1625240658371100

This endpoint is supposed (see Swagger screenshot) to return the metadata of all segments. However, it appears to only return a single segment's metadata (from a "random one").

The table really has many segments, and multiple calls to this endpoint return metadata from different segments every time.

**Expected**
![image](https://user-images.githubusercontent.com/22521284/125203023-d86d6b80-e276-11eb-8bf9-94f4690e85ef.png)

**Actual**
https://user-images.githubusercontent.com/22521284/125203010-c1c71480-e276-11eb-8a60-fd2e901d9983.mp4

Contributor guide

Open the contributing guide

Research direction

Start at the controller implementation for `/segments//metadata` and reproduce the endpoint with a table containing many segments. Compare repeated responses with the expected Swagger behavior and verify that the result includes metadata from all segments rather than one varying segment. Done means the endpoint consistently returns complete metadata for every segment.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.