• Bug
  • Status: Closed
  • 2 Major
  • Resolution: Fixed
  • ehcache
  • Reporter: gbevin
  • July 12, 2010
  • 0
  • Watchers: 0
  • July 27, 2012
  • October 12, 2010

Description

The non-clustered WriteBehindQueue implementation calls ‘processItems()’ in its ProcessingThread without catching the exceptions that might be thrown during that method call.

In the clustered async implementation inside the Terracotta Toolkit this is implemented as such;

  try {
    processItems();
  } catch (final Throwable e) {
    errorHandler.onError(ProcessingBucket.this, e);
    continue;
  }

This works since there’s a concept of error handlers that isn’t present in the non-clustered write behind implementation in Ehcache core. The default error handler simply logs the exceptions that occurred.

Should we implement a logging-only version for Ehcache Core or also introduce error handlers?

For the time being, users can work around this by handling the CacheExceptions themselves in their CacheWriter implementations.

Comments

gluck 2010-10-12

Added to documentation which I think is the most appropriate action right now.