payload
payload copied to clipboard
Local API `create` with `filePath` not properly awaited, leads to mongo lock failure
Link to reproduction
No response
Describe the Bug
Related discord discussion: https://discord.com/channels/967097582721572934/1174039383574331562/1174039383574331562
Receiving this error on API creates, adding a sleep on creates with a filePath solves it.
[
17: 15: 55
] ERROR (payload): There was an error while saving a version for the Image with ID 65282888aebd24030d4f8e0a.
[
17: 15: 55
] ERROR (payload): Unable to acquire IX lock on '{
7925038056408952763: Collection,
1007509028767870907, projectname._images_versions
}' within 5ms. opId: 8048590, op: conn16163, connId: 16163.
err: {
"type": "MongoServerError",
"message": "Unable to acquire IX lock on '{7925038056408952763: Collection, 1007509028767870907, projectname._images_versions}' within 5ms. opId: 8048590, op: conn16163, connId: 16163.",
"stack":
MongoServerError: Unable to acquire IX lock on '{
7925038056408952763: Collection,
1007509028767870907, projectname._images_versions
}' within 5ms. opId: 8048590, op: conn16163, connId: 16163.
To Reproduce
Run a local api create with a filePath (perhaps in a loop with many updates of the same record?)
Payload Version
2.1.1
Adapters and Plugins
db-mongodb