Hi guys, good afternoon, I’m gonna need to delete ...
# troubleshooting
a
Hi guys, good afternoon, I’m gonna need to delete a consuming segment because it got stuck and is no longer streaming data from kafka, what would be the steps to create it again?
m
I think you might be able to fix this problem by resetting this segment - That would force it offline and then into the consuming state, which should then create a new thread to consume from kafka
a
Thanks, I´m gonna try it now!
m
Could you confirm if it worked for your issue @Alexander Vivas
a
I’m afraid that’s no longer an option, someone already deleted the segment by the time I tried to reset, is there anyway (even if it’s dirty) to force pinot to create a new segment?
There are no consuming segments at the moment
The previous segment (currently the last segment) is in state ONLINE
m
I think there is a periodic background thread that may do so, we probably need a rest api to invoke it (if it is not already there). In the meanwhile server restart should do it. Cc: @Neha Pawar
a
I’ll restart the server then, thanks
One note to mention is, this is pinot version 0.6.0, currently in production in our company while we prepare everything for version 0.9.1
n
Segment deletion cannot be recovered by the restart or background task. You'll need some very manual steps now to restore it
There's an issue open to make this a cmd line tool
a
Yes, I just tried to recreate the segment in zookeeper using an existing consuming segment from another realtime table and this is what I came up with in this zookeeper’s path: PROPERTYSTORE/SEGMENTS/dpt_video_event_captured_v2_REALTIME
Copy code
{
 "id": "dpt_video_event_captured_v2__0__316__20220108T2205Z",
 "simpleFields": {
  "segment.crc": "-1",
  "segment.creation.time": "1643277577342",
  "segment.end.time": "-1",
  "segment.flush.threshold.size": "14000000",
  "segment.flush.threshold.time": null,
  "segment.index.version": null,
  "segment.name": "dpt_video_event_captured_v2__0__316__20220108T2205Z",
  "segment.realtime.download.url": null,
  "segment.realtime.endOffset": "9223372036854775807",
  "segment.realtime.numReplicas": "2",
  "segment.realtime.startOffset": "1549438226",
  "segment.realtime.status": "OFFLINE",
  "segment.start.time": "-1",
  "segment.table.name": "dpt_video_event_captured_v2",
  "segment.time.unit": "null",
  "segment.total.docs": "-1",
  "segment.type": "REALTIME"
 },
 "mapFields": {},
 "listFields": {}
}
@Neha Pawar I´m also gonna add this in IDEALSTATES/dpt_video_event_captured_v2_REALTIME
Copy code
"dpt_video_event_captured_v2__0__316__20220108T2205Z" : {
   "Server_mls-pinot-server-1.mls-pinot-server-headless.production.svc.cluster.local_8098" : "OFFLINE",
   "Server_mls-pinot-server-2.mls-pinot-server-headless.production.svc.cluster.local_8098" : "OFFLINE"
  }
Should I add something else elsewhere?
n
Zk metadata should be IN PROGRESS stauts and ideal state should be CONSUMING
Use another consuming segment to copy the states
a
Thanks, I put that metadata in zookeeper and the segment appeared in state ERROR but then I used @Mark Needham suggestion and then it went back into CONSUMING
Thanks a lot
n
Btw, what exactly happened to the segment when you say it got stuck?
a
We saw a delay in our analytics dashboard that depends on pinot getting behind of schedule and when we had a look at the logs we couldn’t see anything, the segment kept on consuming state even though no new data was getting streamed into the realtime table, no new files in the deepstore since 10 days ago which is strange because pinot creates one every day
n
deleting and recreating fixed it?
a
Yes, the messages started to stream into Pinot again