Skip to main content
method Deno.AtomicOperation.prototype.commit

Commit the operation to the KV store. Returns a boolean indicating whether checks passed and mutations were performed. If the operation failed because of a failed check, the return value will be false. If the operation failed for any other reason (storage error, invalid value, etc.), an exception will be thrown.

If the commit returns false, one may create a new atomic operation with updated checks and mutations and attempt to commit it again. See the note on optimistic locking in the documentation for Deno.AtomicOperation.

Returns

Promise<boolean>