Potential bug in becomeForward:, need help!

Chris Muller afunkyobject at yahoo.com
Sat May 18 19:03:40 UTC 2002

Avi Bryan wrote:

Chris, do you really need to proxy symbols?  My guess is that for
performance reasons alone it would make sense to have small objects like
symbols come across the wire immediately instead of being proxied out.
And you're going to have to solve the problem of doing prefetching for
certain types anyway, because even if you solve this hashing problem, you
can't becomeForward: into a SmallInteger either.


All the atomics, SmallIntegers, nil, true, false, etc. have special-value oids,
so they will never be becomed to..

But as for Symbols, it can't be done with my implementation.  Since Symbols are
of arbitrary size, they have to have their own buffer in the database.  When a
domain object is referencing a symbol in the database, the buffer only has the
oid of the symbol object.  It can't KNOW its a symbol unless it reads its
buffer off the disk to check its class id.

So think about this scenario and you'll see why proxying a Symbol is
unavoidable.  Magma, by default, reads 2 or 3 levels deep when it goes to
mateialize a proxy.  All non-atomic oids referenced by the
bottom-level-object-buffers must be proxied out.

If one of those happens to be a Symbol object, when that proxy is sent a
message, it will not understand, causing it to go get the buffer, only then
will it see that its classId is for a Symbol, and will intern it from the
SymbolTable with the correct identity.

But since many objects could already have been referencing that proxy, they ALL
now need to reference the Symbol.  That's why the need for becomeFoward is

Does that make sense?

Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience

More information about the Squeak-dev mailing list