remove: and GOODS -- identity problems?
Avi Bryant
avi at beta4.com
Thu Jul 8 18:40:16 UTC 2004
On Jul 8, 2004, at 2:42 AM, Ragnar Hojland Espinosa wrote:
> On Wed, Jul 07, 2004 at 11:22:37AM -0700, Avi Bryant wrote:
>> Can you reproduce it consistently, preferably in an SUnit test?
>
> I'm attaching a crude changeset in which the test fails most of the
> time. Tested in a 3.6 image with:
>
> Monticello 150
> ANSI Compatibility 12
> Btree 28
> GOODS 67
>
> Hope you find something interesting :)
The problem is this line in KKRecordCache>>commitObjects:
newObjects := IdentitySet new.
If you comment it out, the KKIdentitySet should work.
That line was added in GOODS 64. Unfortunately, my commit log doesn't
remind me of *why* it was added. It doesn't seem to make any tests
pass that didn't before. So it's possible that removing it will
reintroduce some subtle bug, but it's also possible that I was just
being overzealous during a refactoring. I'm annoyed that I can't
remember, but hopefully if there's a bug we'll trip over it again soon.
Something that occured to me about the approach of using OIDs for hash
codes: it means that even objects that you don't put in the set, but
just check for inclusion in the set, will still need a hash code, and
thus be assigned an OID - and thus be stored to the database on the
next commit. This is probably fixable in the long run, but for now,
beware what you use as the argument to #includes:.
Avi
More information about the Squeak-dev
mailing list
|