Description
There is a problem with the way that we currently generate container ids. Like this:
- process 1 reads user, it gets assignemnt(id=1,target=A)
- process 2 modifies user: deletes assignemnt(id=1,target=A), adds assignemnt(target=B). The second assignment will also get id=1
- process 1 deletes assignemnt(id=1)
- Whoops, wrong assignment gets deleted
There are several options to resolve this problem:
- Never reuse IDs. This would be easy, we do not need to modify the client code, but:
- The IDs will get reused eventually when the counter overflows
- User may chose IDs and therefore force reuse (although this may not really be a problem)
- Forget about IDs for delete deltas and always delete by value. But:
- There may be value matching and authorization issues (e.g. metadata)