Controller's `/segments/<tableName>/metadata` does not return metadata from all segments of the table
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

Actual https://user-images.githubusercontent.com/22521284/125203010-c1c71480-e276-11eb-8a60-fd2e901d9983.mp4
Hi, I tried to reproduce this error to fix this issue but I was not able to reproduce it. I created an offline table with ten segments and this was the result when I used the api /segments/{tableName}/metada . I did this test in branch master. In which branch/tag did you find this problem ? @MrNeocore
Segments of the table:

Metadata for all table segments:

@brayanjuls Interesting, let me try on several clusters and tables, see if that issue is maybe more specific to some case
I could reproduce using different tables (OFFLINE and REALTIME) and 2 clusters, but both on version 0.8.0-SNAPSHOT-46009e152b8f56c244e415beefa81dbc626de7cb - so maybe that's why you could not reproduce ?
I am on version 0.8.0-SNAPSHOT-6d0ab91de409fec8ddbf816c2348c8b95a37e393 which is a recent one, maybe the problem was already solved in this version. I will try to reproduce using your version, but could you give it a try with a recent version.
Sure, I'll try with a more recent version asap
@brayanjuls @MrNeocore were you able to reproduce this issue?
@piyushchauhan Sorry I haven't. I am not using Pinot much lately so if someone wants to check, please do