What is the difference between status "online" and...
# troubleshooting
s
What is the difference between status "online" and "consuming" under segments in Pinot UI? I can see different indexes on the segments with different statuses or even after reloading same segment:
Though when I used different index configs, I can still see indexes on my old data.
Below are my table config for index:
Copy code
"tableIndexConfig": {
    "sortedColumn": ["score"]
  },
  "fieldConfigList": [
    {
      "name": "leaderboardId",
      "indexes": {
        "inverted": {}
      }
    },
    {
      "name": "participantId",
      "indexes": {
        "bloom": {}
      }
    }
  ],
OR:
Copy code
"tableIndexConfig": {
    "sortedColumn": ["score"],
    "invertedIndexColumns": ["leaderboardId"]
  },
  "fieldConfigList": [
    {
      "name": "participantId",
      "indexes": {
        "bloom": {}
      }
    }
  ],
I see below in reload status:
After deleting segments with zero docs I got below:
a
now are you loading data again , I think if you update the table config via curl command the segments should build fast as they are already persisted
h
What is the difference between status "online" and "consuming" under segments in Pinot UI?
Once a realtime segment (which is ingesting data from any stream) reaches the confiugred size threshold, it's status changes to online from consuming. Ref: https://docs.pinot.apache.org/basics/concepts/components/table/segment/segment-threshold
I can see different indexes on the segments with different statuses or even after reloading same
Some indexes are created once the consuming segment is committed/completed. Hence, you might see different indexes between consuming and online segment. Index specific documentation should call out this.
s
Thanks @harnoor But why the sorted index get created for online segment for all fields? If index should be there then they should be the ones present while consuming even if number of docs is zero.
m
Sorted index creation requires sorting the data on that column, which is only done for completed segments, and not for consuming segments. Are you just trying to understand the behavior, or actually seeing an issue?
s
Hi @Mayank Thanks for your response. I want to understand 1. the behaviour of index on Online vs Consuming Segments 2. why there's sorted index on each field in online segment with zero docs though I didn't set up such index 3. why on segment reload, the consuming segment gets converted into online and stays there with zero docs
m
Hopefully 1 is answered from my response above. For 2, if there are no docs, there isn't really an index, where are you seeing it? If you are seeing that, then I think reload may be committing the consuming segment to ensure it is reloaded.
s
Sorted index creation requires sorting the data on that column, which is only done for completed segments, and not for consuming segments. Are you just trying to understand the behavior, or actually seeing an issue?
Is it true for Bloom Filter as well? I can't see that as well in consuming segment. Or it's just my index is not working fine? Can I see the indexes which a segment will get after completion while it's in consuming state so that I can confirm if my index config is working fine? For 2, please refer to the second image posted in the main message of this thread. There are sorted index for each field when I have zero docs in an online segment?
m
You can call segment metadata rest-api to get column level metadata including indexing.
For 2, I think there isn't actual index, it might just be that zero or 1 record is sorted by definition.