How to prevent duplicates in mongodb timeseries collection

I’m having the same issue here. Any solutions other than upsert?