So this is not a huge deal as it's a dev environme...
# troubleshooting
s
So this is not a huge deal as it's a dev environment, but we accidentally loaded about 20 mutable realtime segments into an immutable offline table and want to delete them but get this error message: Table name: immutable_events_OFFLINE does not match table type: REALTIME. Can we manually delete those segments?
m
Hmm, did the offline table already exist? The error suggests there is no offline table by that name
b
yes it existed and had segments
s
yeah we loaded our offline segments fine, but then accidentally ran the segment metadata push using the wrong segments folder as the source and ended up in this state. So 20 bad segments are sitting there and actually queryable b/c the schema is pretty close. But deletes fail through the UI and swagger api call with that error. I see in zookeeper there's an external view that has the segments in there and tried to delete one and got a 400 error.
So basically just looking for the nuclear option on a segment. Maybe delete the folder entirely for that segment from the offline table? Figured I'd ask here just in case.
k
You can try to disable that segment first.. theoretically you can delete them but the code might have some validation because it’s seeing the table name from segment metadata
We should probably have that validation during upload so it would have prevented you from uploading those segments in the first place
s
agreed yeah
@Kishore G what will pinot do if I just delete the folders for these segments on the offline server?
m
We added a feature to be able to push same segment to multiple tables. Better fix is to remove the table name dependency from metadata
1
It will throw exceptions in the log but will work
s
ok
a
how do you disable a segment?
I don't see it in pinot UI or swagger
s
The segment reports this in the metadata in the UI
Copy code
{
  "code": 403,
  "error": "Table name: immutable_events_OFFLINE does not match table type: REALTIME"
}
And if I look at metadat.properties on the offline server I see this as the table name
segment.table.name = mutable_events
@Mayank are you saying remove that line above from metadata.properties?
k
its a swagger api call
m
I wasn’t suggesting that as a work around right now, but a clean fix moving forward
For now, check swagger api for disable segment
👍 1
s
So we are version .10 and there is no swagger disable segment API available that we can see.
Any other suggestions here?
m
Hmm, it is an old api let me check