Archived

This forum has been archived. Please start a new discussion on GitHub.

Freeze Evictor Transactions

Hi,

We are getting deadlock exceptions using the freeze evictor. Things seem to retry and be OK, but we are trying to understand what is going on. Can anyone explain the transaction model that it used with the evictor and how deadlocks can occur?

Thanks,

Comments

  • bernard
    bernard Jupiter, FL
    Hi Andrew,

    Each Freeze Evictor uses a dedicated thread to save updates in the background. That's the only thread writing anything to the underlying database, and it writes the updates (including additions and deletions) using transactions.

    At the same time, other threads can read the database; reads acquire read locks on one or more pages in the underlying file. The reads that acquire the most locks and are the most likely to trigger deadlocks are iterations (the getIterator() call on the Evictor).

    A deadlock from time to time in a Freeze Evictor application is nothing to worry about. But a large number of deadlock can obviously lead to poor performance and more deadlocks; if this happens, try these Freeze Evictor properties to reduce the length of your write transactions: MaxTxSize, SaveSizeTrigger, SavePeriod.

    Best regards,
    Bernard
  • Thanks

    Thanks a ton for the response.

    And to all the ZeroC folks, thanks very much for a very nice, well-supported, and carefully constructed product.