• Bug
  • Status: Closed
  • 2 Major
  • Resolution: Fixed
  • ehcache-core
  • hsingh
  • Reporter: mads1980
  • May 24, 2010
  • 0
  • Watchers: 2
  • January 17, 2013
  • May 25, 2010

Attachments

Description

  • status: should probably be made volatile as modified recently in MemoryStore. Right now there does not seem to be concurrent access / modification but there could be in the future.

  • active: should be made volatile, it is subject to multi-threaded access.

  • totalSize: should be replaced by AtomicLong. It is being incremented/decremented concurrently and these operations are not atomic, leading to lost updates and/or incorrect calculations.

  • lastElementSize: should be made volatile, bufferFull() and writeElement() can access this concurrently. Since this is only used for rough estimates it does not seem critical though.

Comments

Manuel Dominguez Sarmiento 2010-05-25

DiskStore patch including mods for EHC-721, EHC-722, EHC-723, EHC-725, and EHC-726

Fiona OShea 2010-05-25

Chris does this affect 2.1?

Chris Dennis 2010-05-25

Not in any significant way. The old DiskStore (which this issue relates to) is only used when the user requests the old LinkedHashMap based LRU store via the magic system property. In any case even if they do this, this bug (and the others recently filed) are not new.

Himadri Singh 2010-06-27

Tweaked patch has been checked in.