On 04 Dec 2015, at 00:16, Ben Coman <btc@openinworld.com> wrote:
I haven't used VoyageMongo, but just a general comment that maybe the testcase is best produced at your end, since you understand the symptoms and can cut down a slice of your application as a template. Publishing that to the mail list provides an explicit demonstration of the problem making it easier for someone to assist. Indeed, as an extension if all the steps to load up VoyageMongo and set up the environment are included, sometimes I'll even be inclined to investigate such things that are unknown to me as a form of goal-directed learning (although right I'm now tied up with some other things).
One will need to install a real mongodb to test this and then load VoyageMongo (e.g. through the Configuration Browser) | repo point | repo := VOMongoRepository database: 'cacheIssue'. 1 to: 100 do: [:each | point := Point x: 10 y: 20. repo save: point. repo remove: point. ]. "In Pharo3.0 inspect objects and timeStamps" (repo cache instVarNamed: #objects) size -> (repo cache instVarNamed: #timeStamps) size. "Later versions inspect objects and versions" "(repo cache instVarNamed: #objects) size." (repo cache instVarNamed: #versions) size." The entries in timeStamps/versions will not go away even if one calls: repo cache performCompact The two issues I see are: 1.) VOMongoCache>>#removeValue: is leaving the timeStamp/versions alone and nobody is removing the timestamp entry and compaction will only remove keys from timeStamps/versions that were inside the objects. 2.) removeValue should most likely use self mutex criticial to guard itself. kind regards holger