Avoiding Repository Cache Overflows

Meta Data Services Programming

Meta Data Services Programming

Avoiding Repository Cache Overflows

To enhance performance, repository transactions typically run in writeback mode. In writeback mode, the updates for a transaction are held in the repository cache until the transaction is committed. If a single transaction performs a large number of updates, it can cause the repository cache for the process to overflow.

By setting transaction options through the SetOption method, a repository instance can operate in exclusive writeback mode, where it allows no more than one active transaction at a time for a given process and repository database. Using exclusive writeback mode will reduce, but not eliminate, the possibility of a cache overflow. For a very large number of updates within a single transaction, or if memory is limited, the repository cache can still overflow.

To guarantee that cache overflows will not cause transactions to fail, set the exclusive writethrough mode transactional option. In exclusive writethrough mode, updates are immediately flushed from the repository cache. Exclusive writethrough mode does not affect your ability to cancel an active transaction by using the Abort method.

See Also

IRepositoryTransaction::Abort

IRepositoryTransaction::SetOption

Managing Transactions and Threads

TransactionFlags Enumeration