Does anyone else think the #increment method should be updated to better support concurrent requests? I have run into it several times now where I just wish it would try to increment the counter and if the object doesn’t already exist, create it and then increment it.
So for example, two requests happen at the exact same time to increment an object that isn’t yet persisted. In that case, the results can vary. Both requests will check for the persisted object and then both requests will try to create the object and either have an exception or create two objects each with a count of 1.