I am using mongoDB to store excel dump, I upload variable size of excel some time 20 rows sometime 40k rows. Yesterday suddenly order of all documents shuffled with random order.
When I uploaded same excel files again mongoDB is giving the documents in same order as present in excel on retrieval, but for excels uploaded a week back order is shuffled.
Although using the sort on objectId I am able to retrieve document in original order but it take extra time to fetch documents with sort operation as compared to plain find query.
The only change happened on database server is "server restart", I am using NodeJs and native mongoDB driver (NodeJS) for uploading excel in mongoDB.