Similar to the existing DeletePartitions command, we could introduce another kind of "administrative" request for deleting the segments. Given the specific Stream ID + Topic ID + Partition ID, the segments_count should remove all the segments starting from the oldest one (the lowest start offset in the log filename). The manual segments removal should act in the same way as the automated message expiration feature.
Similar to the existing
DeletePartitionscommand, we could introduce another kind of "administrative" request for deleting the segments. Given the specific Stream ID + Topic ID + Partition ID, thesegments_countshould remove all the segments starting from the oldest one (the lowest start offset in the log filename). The manual segments removal should act in the same way as the automated message expiration feature.