https://slatedb.io logo
It'd be great to be able to specify a
# general
p
It'd be great to be able to specify a name when creating a snapshot. It's currently a bit rough when restoring a snapshot is performed by the end user through the ID. (and storing the name separately in the DB through a mapping is not great as it's not atomic)
c
Ah, we discussed this when implementing the feature. I think we opted for UUID becuase we thought folks could store the name outside. IIRC, can't you provide a UUID when creating a checkpoint? If so, you could generate a name <> UUID mapping and store it elsewhere, then create the checkpoint with that UUId.
p
Yes but this cannot really be atomic
As in my mapping can not match what’s actually in the db / I can have mappings for checkpoints that actually failed to create
c
Correct. You'd have to check if the CP exists, and if not, create it. And this could lead to a race where it's been deleted and you didn't know. Not ideal, I agree. 🤔
Wanna GH issue for me? We should be able to add an optional name without affecting compatibility
p
Will do!
I think the worst case is Create mapping Create checkpoint Create checkpoint failed Remove mapping failed
Or create checkpoint Create mapping Create mapping failed Remove checkpoint failed
c
Yep. I think we can get around it by adding an optional string to the checkpoint flatbuffer and then providing a lookup method. Not sure if we want to bother guaranteeing the checkpoint name is unique or not...
p
This can be enforced by the db user pretty easily
c
Yep
I'm inclined not to bother because the db user can do it