commit method

void commit(
  1. TxnContext ctx
)

Mark a transaction committed, release its locks.

Implementation

void commit(TxnContext ctx) {
  if (!ctx.isActive) return;
  ctx.status = TxnStatus.committed;
  _active.remove(ctx.txnId);
  if (ctx.txnId > _lastCommitted) _lastCommitted = ctx.txnId;
  lockManager.releaseAll(ctx.locks);
  ctx.locks.clear();
}