Bug 51098

GemStone/S 64 Bit

3.7.4.3, 3.7.4.1, 3.7.2, 3.7.1, 3.7, 3.6.8, 3.6.7, 3.6.6, 3.6.5, 3.6.4, 3.6.3, 3.6.2, 3.6.1, 3.6, 3.5.8, 3.5.7, 3.5.6, 3.5.5, 3.5.4, 3.5.3, 3.5.2, 3.5.1, 3.5, 3.4.5, 3.4.4, 3.4.3, 3.4.2, 3.4.1, 3.4, 3.3.9, 3.3.8, 3.3.7, 3.3.6, 3.3.5, 3.3.x, 3.3, 3.2.16, 3.2.15, 3.2.14, 3.2.13, 2.4.8, 2.4.4.8, 2.4.4.7, 2.4.x

Possible garbage references retained by IndexManager allIndexes built in 3.3.x or earlier

In versions before v3.4, IndexManager held references to the current set of indexes in an instance of RcIdentityBag. The nature of the RcIdentityBag implementation means that it depends on the pattern of session logins to finalize references to removed objects. So, it may retain references to removed indexes indefinitely if the pattern of session logins that access the collection has an exceptional case or changes.

In v3.4 and later, IndexManager uses an instance of RcIdentitySet, which implements RC using commit retry, and does not have this problem.

In v3.3.x and earlier repositories, and in repositories that originated before v3.4 and were upgraded but did not drop and rebuild all indexes, there is a risk that indexed collections that were otherwise dereferenced will still not be garbage collected, due to a reference from IndexManager's allIndexes.

Workaround

Removing and rebuilding all indexes, using IndexManager removeAllIndexes or removeAllTracking, will reset the instance variable.


                

Last updated: 8/21/25