How do I check if a query is done and the values are saved?
This is my problem. I save a a value in a new document using INSERT. I then SELECT all similar documents. But it seems like the value needs some time to be saved in the document. I made my script sleep for 5 seconds before doing the SELECT. Then everything works.
You can look at the various graphs on the bucket to see how quickly the indexes are being updated. It should tell you the drain rate, time it took to update, how many updates are waiting, etc.
Under normal usage you really shouldn’t have to wait between the document change and the index being updated - but if you’re running in a low spec VM or container under load it might be slow.