Hi,
My name is Vishal and I work as a Product Manager in MongoDB Atlas Serverless team. The code snippet you posted seems to be creating a TTL index which automatically deletes your document based on the expires flag. TTL indexes are interesting and by definition will result in a very very small number of WPUs so that the system can check when to delete your document. I was curious whether the Good code snippet you posted actually works - one reason you could be seeing this behavior is because the change never actually creates TTL index. Please let me know?
2 Likes