yarricharY
Convex Community2y ago
2 replies
yarrichar

When does a mutation commit?

I assume this is a silly question, but I'm just wanting to check that if I call a mutation from an action that the mutation will have succeeded or failed when the mutation call returns?

I'm basically wanting to do:
actionA:
    runMutation(lockRecord);
    try {
        // do stuff while I'm holding the lock
    } finally {
        runMutation(releaseRecord);
    }


Just asking because queries and mutations are deterministic, and the talk in the docs about it being safe to retry them.
Was this page helpful?