Clean possible unused indexes structures?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Clean possible unused indexes structures?

GLASS mailing list
Hi Dale,

I have read in the programming guide that one must remove indexes prior to removing the collection containing them.  I am trying to understand why my extent has grown way too much recently and I fear I might have not deleted indexes in all cases. 

Is there some magic code to clean indexes structures of possibly removed collections?

Thanks in advance, 

--

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: Clean possible unused indexes structures?

GLASS mailing list

You can get the list of all collections with nscs by executing the following:

  IndexManager current getAllNscRoots

Then you can send #removeAllIndexes to each of the collections that should not be indexed ... the process of removing all indexes will remove the collection from IndexManager so that the index structures and the collection itself can be gc'ed ...

Dale


On 08/15/2017 06:00 AM, Mariano Martinez Peck via Glass wrote:
Hi Dale,

I have read in the programming guide that one must remove indexes prior to removing the collection containing them.  I am trying to understand why my extent has grown way too much recently and I fear I might have not deleted indexes in all cases. 

Is there some magic code to clean indexes structures of possibly removed collections?

Thanks in advance, 

--


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: Clean possible unused indexes structures?

GLASS mailing list


On Tue, Aug 15, 2017 at 1:57 PM, Dale Henrichs via Glass <[hidden email]> wrote:

You can get the list of all collections with nscs by executing the following:

  IndexManager current getAllNscRoots

Then you can send #removeAllIndexes to each of the collections that should not be indexed ... the process of removing all indexes will remove the collection from IndexManager so that the index structures and the collection itself can be gc'ed ...


Thanks Dale for the pointer. Code is running... I will know soon enough if it worked or not. 

After having this issue, I was also reading IndexManager class comment:

" Automatic garbage collection of unreferenced UnorderedCollections is _not_ preformed, so
 one must explicitly remove all indexes from an UnorderedCollection that is no longer used.
"

So...my obvious question is...why not storing the indexes directly into the collection? (I won't ask if you thought about it because you obviously did, so there must be reasons)  That would solve GC issue. 

Thanks for sharing your thoughts,



 

Dale


On 08/15/2017 06:00 AM, Mariano Martinez Peck via Glass wrote:
Hi Dale,

I have read in the programming guide that one must remove indexes prior to removing the collection containing them.  I am trying to understand why my extent has grown way too much recently and I fear I might have not deleted indexes in all cases. 

Is there some magic code to clean indexes structures of possibly removed collections?

Thanks in advance, 

--


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass




--

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: Clean possible unused indexes structures?

GLASS mailing list

Mariano,

The index data is not the problem ... there are strong dependency links between the objects in the index and the index data structures that have to be cleaned up and it those links that are troublesome to gc ... and those strong links ar ewhat keep the indexes/collections alive even if all other connections are severed.

Dale


On 08/15/2017 10:24 AM, Mariano Martinez Peck wrote:


On Tue, Aug 15, 2017 at 1:57 PM, Dale Henrichs via Glass <[hidden email]> wrote:

You can get the list of all collections with nscs by executing the following:

  IndexManager current getAllNscRoots

Then you can send #removeAllIndexes to each of the collections that should not be indexed ... the process of removing all indexes will remove the collection from IndexManager so that the index structures and the collection itself can be gc'ed ...


Thanks Dale for the pointer. Code is running... I will know soon enough if it worked or not. 

After having this issue, I was also reading IndexManager class comment:

" Automatic garbage collection of unreferenced UnorderedCollections is _not_ preformed, so
 one must explicitly remove all indexes from an UnorderedCollection that is no longer used.
"

So...my obvious question is...why not storing the indexes directly into the collection? (I won't ask if you thought about it because you obviously did, so there must be reasons)  That would solve GC issue. 

Thanks for sharing your thoughts,



 

Dale


On 08/15/2017 06:00 AM, Mariano Martinez Peck via Glass wrote:
Hi Dale,

I have read in the programming guide that one must remove indexes prior to removing the collection containing them.  I am trying to understand why my extent has grown way too much recently and I fear I might have not deleted indexes in all cases. 

Is there some magic code to clean indexes structures of possibly removed collections?

Thanks in advance, 

--


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass




--


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass