Pivotal Knowledge Base

Follow

Deadlocks occur between query and cache operations when enabling eviction and persistence to disk in GemFire 6.x

Deadlocks occur between query and cache operations when enabling eviction and persistence to disk.

Symptoms

A potential deadlock situation exists between query and cache operations (for example, update then destroy) for regions where both eviction and persistence are enabled in these GemFire versions:
  • 6.5.0.x
  • 6.5.1.x
  • 6.6.0.x
  • 6.6.1.x

Cause

This deadlock can happen due to a mismatch in the locking sequence used by the query and cache operation threads.

In the case of query operations, GemFire first locks the relevant indexes and then locks the region entries to read values from disk. Cache operation threads, by contrast, lock region entries first and then lock indexes to update the indexes afterwards.

Resolution

To resolve these conflicts, use one of these options:
  • Upgrade to GemFire 6.6.2 or later. 

  • For GemFire versions 6.5.1.x, 6.6.0.x, and 6.6.1.x, this system property is available which eliminates the conflict:

    -Dgemfire.index.acquireCompactIndexLocksWithRegionEntryLocks=true

  • Disable eviction with persistence to disk. This entirely avoids the potential deadlock.

Comments

Powered by Zendesk