Thanks Jake.

I'm not 100% sure, but all live interaction with the PdxTypes region is
done through the TypeRegistry.

The TypeRegistry has methods like defineType and updateRegion which add new
PdxTypes to the region and update in-memory maps. The defineType method
gets a DistributedLock and then calls the updateRegion method to
transactionally update the PdxTypes region. Then it adds the new PdxType to
its in-memory maps.

Something similar would be required for removing PdxTypes from the region.

Maybe a method that:

- gets the DistributedLock
- transactionally does all the work in the RemoveUnusedPdxTypesFunction
- removes the PdxTypes from the in-memory maps
- releases the DistributedLock

Thanks,
Barry Oglesby



On Sat, May 2, 2020 at 9:03 AM Jacob Barrett <jbarr...@pivotal.io> wrote:

> This is awesome! It sounds like a good solid thing to have as a feature to
> me. What’s the smallest change needed to make this safe to run on a live
> system?
>
> On Apr 29, 2020, at 2:49 PM, Barry Oglesby <bogle...@pivotal.io> wrote:
>
> 
> Geode Users,
>
> I published an article describing how to remove unused PdxTypes from a
> Distributed System here:
>
>
> https://medium.com/@boglesby_2508/remove-unused-pdxtypes-from-an-apache-geode-distributed-system-5a4f0e199e34
>
> Thanks,
> Barry Oglesby
>
>

Reply via email to