hazelcast/hazelcast — pull request #198 by eivindw (2012-06-28 19:07:35+00:00)
Title: 2.1

We are using flush() on IMap instance to ensure that all changes have been persisted to our MapStore. However, I've noticed that the same entries are stored twice; first on the flush() and then after some seconds due to the MapStore write-behind delay. The reason this is happening is because flush() on ConcurrentMapManager does not reset the dirty flag and store time of the record. Pull request fixes this, with a modified test to prove it.

Another related issue is that flush() does not delete records. If you do map.clear() followed by map.flush() nothing happens since flush() only stores.

Could not the same code be used both for flush() and regular cleanup? This would feel more consistent I think.