fix: use uuid4 instead of getID() in DSPY to avoid nanoid collision under concurrency
Two getID() calls per request (DSPY + uapi_request) under 200 concurrent caused nanoid random state corruption → 34% duplicate IDs → IntegrityError. uuid4 uses OS entropy, independent of nanoid state.
This commit is contained in:
parent
8c77f552a8
commit
9da343b2e1
@ -43,7 +43,8 @@ params_kw.llmid = llmid
|
||||
params_kw.llmcatelogid = catelogid
|
||||
|
||||
debug(f'{params_kw.llmid=}')
|
||||
luid = getID()
|
||||
import uuid
|
||||
luid = str(uuid.uuid4())
|
||||
reserved = await env.reserve_balance(params_kw.llmid, userorgid, luid)
|
||||
if not reserved.get('ok'):
|
||||
debug(f'{userid=} balance not enough: {reserved}')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user