In the App Engine documentation (https://cloud.google.com/appengine/docs/python/ndb/transactions), it says: "If the transaction 'collides' with another, it fails; NDB automatically retries such failed transactions a few times."
The meaning of this sentence is not totally clear to me. If transaction A begins first, and then transaction B begins in the middle of A's operation, does that mean that both A and B will fail and retry? Or does only B fail, and A continues?
Also, a related question: are there any cases in which a transaction would be partially completed and then rolled back? Or does each transaction attempt not enter the function at all until it has the opportunity to complete the function?
Thank you!