| I see three potential solutions: 1. Add a synchronization of some sort to avoid ending up in a situation where two tasks work on the same ID 2. Disable concurrency in smoke tests, so that the main build won't be affected by the issue 3. Mitigate the issue by ensuring that N consecutive requests for a random entity ID will always return N unique IDs (but requests separated by more than N calls may still result in the same ID). #3 is not an absolute solution, but if it should work if N is much higher than the number of threads, and if all tasks requesting a random ID have a similar execution time. Sanne Grinovero: unless you have an objection, I'll go with solution #3, which I think balances benefits and runtime costs best. |