I have a data source named "test" with a segment and I want to drop that segment. From the documentation I came to know that for deleting a segment I have to mark it as unUsed and then kill it.
For marking the data source as unUsed I send a post request to the endpoint mentioned below with my segment id in the body
http://<ip>:<coordinator_port>/druid/coordinator/v1/datasources/test/markUnused
{
"segmentIds":[
"test_2024-02-01T00:00:00.000Z_2024-03-01T00:00:00.000Z_2024-01-30T06:16:15.950Z_6" ]
}
but I got the response as
{
"numChangedSegments": 0
}
after few hours I send the same request and i got the result as
{
"numChangedSegments": 1
}
Why such thing happened with respect to time and how can I fix this to mark the segment as unUsed whenever I want without waiting for hours
- Druid Version : 26.0.0
- data source ingestion type : Kafka
Since my data source is obtaining data from kafka ,Druids needs some time to push the data to deep storage until then it will be denoted as real time segments and marking real time segments as unused is not possible in druid ,One can verify the segment is in real time or not with the help of druid UI itself .Since I had tried to mark the segment as unused when it is in real time I got
after few hours I send the same request which marks the segment as Unused , Since the segment went to deep storage on that time .