Are insert triggers run to completion before queries return the document?

Hello everybody,

With regards to database triggers that run on insert and set values on the newly created document, is the trigger guaranteed to be run before any read queries for that document return, so that these queries always contain the values set by the trigger?

I know that writes to single documents are atomic but I’m not sure whether that includes triggers invoked as part of the write.

Essentially I am wondering whether my application logic needs to handle the case where it inserts a document and immediately queries it, using the _id returned by the insert operation, but the returned document doesn’t yet contain a value calculated by an insert trigger.