Counter service is not concurrency safe and can result in same value being returned twice

Description

This may result in round-robin assigning doubling up assignees.

Need to check the store in both server & cloud.

Basically this should change:

1 2 3 4 5 6 7 dbConnection.update(counters) .set(counters.count, returnValue) //TO dbConnection.update(counters) .set(counters.count, counters.count.add(1))

May also have to deal with duplicate inserts if there isn't a value yet.

Environment

None

Status

Assignee

Nick Menere

Reporter

Andreas Knecht

Labels

Links

1

Priority