the general pattern for auto increment is:
- use the incr() operation to atomically create a new number (a specific doc which acts as your counter)
- then go use that number to construct the document key.
This will make sure that - since the incr is atomic - you will not end up with duplicate keys.