The following sequence may cause instances to be committed that shouldn't
have been:
markForCollection
listInstances on Foo
commit
objectAudit
In this case, markForCollection finds instances of Foo and records them
as possibleDead. Because the markForCollection ends its operation with
an abort, the session votes on the possibleDead (and doesn't remove any
from possibleDead). The listInstances method (operating on the transaction
view at the end of the markForCollection) finds those instances of Foo
that the mark added to the possible dead and commits them. If the GcGem
had completed its sweep of the possibleDeadWsUnion, the commit would have
failed, because the object is placed in the exclusiveLock set when the
sweep completes.
Avoid committing the result of listInstances or listReferences.
In a single user system, you can do a SystemRepository reclaimAll between
the markForCollection and the call to listInstances. This sequence guarantees
that the view of the repository doesn't contain any unreclaimed dead, meaning
that only "live" instances will be found.
In a multiuser environment, monitor the deadNotReclaimed and wait until
this goes to zero.
Last updated: 11/20/07