Can IDs of rows in different branches collide?
I'm using S3 and storing objects based on Xata ID's.
Example: When I'm creating/deleting multiple test users (different Xata branch than main) and creating/deleting S3 objects along with them, is there a risk of overwriting actual user objects in S3? Currently the ID is the only differing part in the S3 path of the objects so I'm treating the ID's as globally unique.
Could not find this in the Docs
2 Replies
Record ids are guaranteed to be unique at the Table scope. Identical record ids can occur across tables and branches. In order to ensure uniqueness of object names derived from Xata ids and stored in a common bucket for the same database, the naming scheme of the objects should include branch and table identifiers. Otherwise there's no guarantee that the same object name won't show up, be it automatically generated by Xata or explicitly set.
thanks for the super quick response!