0
votes

Firebase provides .read, .write and .validate in the security rules. In each of these you’re allowed to access various other parts of the entire data tree.

I am curious if the security rules are atomic and whether the data you validate against elsewhere in the tree is guaranteed to be "locked" while the security rules are being applied.

Take for example any .write or .validate rule that is simply "!data.exists()" while this prevents updates from being made to an existing object when creating it does it make it safe from two users creating the same object at the same time?

1

1 Answers

1
votes

Yes, writes are currently atomic so you don't have to worry about two users trying to write to the same location at the same time.