Модуль txn¶
-
bool
box_txn
(void)¶ Return true if there is an active transaction.
-
int
box_txn_begin
(void)¶ Begin a transaction in the current fiber.
A transaction is attached to caller fiber, therefore one fiber can have only one active transaction.
Результат: 0 on success Результат: -1 on error. Perhaps a transaction has already been started
-
int
box_txn_commit
(void)¶ Commit the current transaction.
Результат: 0 on success Результат: -1 on error. Perhaps a disk write failure
-
void
box_txn_rollback
(void)¶ Rollback the current transaction.
-
void *
box_txn_alloc
(size_t size)¶ Allocate memory on txn memory pool.
The memory is automatically deallocated when the transaction is committed or rolled back.
Результат: NULL on out of memory