Removing entity from persistence storage when lease expire?

We use Gigaspaces as an in-memory database and back up our data by mirror it to MongoDB, which is our persistence storage. We have a mirror service which makes sure everything we create, update and delete is written or removed to the permanent storage.

Classes with leases have a field named "lease" of type long with a getter annotated with @SpaceLeaseExpiration. This ensures the entity is not loaded during an initial load if expired. This works as expected.

The problem arise when a lease expire while the space is running. The object does not get its corresponding entity removed from Mongo.

The workaround is to create a polling container which listen for expired entities and manually remove it from Mongo. This is a big pain though.

We expect it to work as a take operation, which does indeed removes the coresponding entity in Mongo.

Using Gigaspaces 12.1.1.

asked 2018-01-31 09:46:33 -0500

GS_User gravatar image
edit retag flag offensive close merge delete