vjekob / al-objid

Manage object IDs in multi-user environments with mind-boggling simplicity.
MIT License
29 stars 18 forks source link

Adding a field with "injectSemicolon" set and at the same time another user has consumed the id, results in two semicolons added #21

Closed DavidFeldhoff closed 2 years ago

DavidFeldhoff commented 2 years ago

Hi Vjeko, if the injectSemicolon flag is set, then I get the proposal of let's say 4;. That's fine. But in the unlikely event that at the same time another user consumes the 4, then I'll get the next number 5. That's also fine. But currently the code is working like this: Insert 4; and then replace the already consumed id 4 afterwards with the new id 5+ semicolon. So it replaces 4 with 5; which results in 5;;