I'm running upsert, and right after that delete by query, however, some of the documents upserted should be picked up by the following delete request. Is there a chance to send/execute the delete request only after the documents have successfully been upserted?
Currently, if I run the commands without any delays, none of the upserted documents are deleted. I did try to add the artificial delay of several seconds, and things work out well then. If it is not possible to know the exact time documents have been persisted, is there an upper bound when can that be expected?