Tracking for heavy operations while having active transactions.
Some operations, like http requests, are heavy and can take too long during an incident. If they are called during an active database transaction, connection will be held for longer and connection pool will be exhausted. Transaction tracker prevents this by holding counter of active transactions in TaskLocalVariable and checking for active transactions in heavy operations.
Classes | |
class | CheckDisabler |
Disable check for active transactions. More... | |
class | TransactionLock |
Class for incrementing and decrementing transaction counter. More... | |
struct | TransactionTrackerStatistics |
Statistics for transaction tracker. More... | |
Functions | |
void | CheckNoTransactions (utils::impl::SourceLocation location=utils::impl::SourceLocation::Current()) |
Check for active transactions. | |
void | CheckNoTransactions (std::string_view location) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
TransactionTrackerStatistics | GetStatistics () noexcept |
Get statistics for transaction tracker. | |
void | ResetStatistics () |
Reset statistics for transaction tracker. | |