zrok icon indicating copy to clipboard operation
zrok copied to clipboard

Resource Limit Race Condition

Open michaelquigley opened this issue 1 year ago • 1 comments

When creating resources (shares or environments) quickly (programmatically, in a loop) the resource limits are not always correctly enforced.

Naively I would expect that we could fix this pretty simply by way of pessimistic locking (SELECT ... FOR UPDATE), but that isn't supported by SQLite.

So, we're going to need to figure out another locking mechanism that works across both database types.

michaelquigley avatar Apr 05 '23 15:04 michaelquigley