Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question
0

Persistent persistence

I've been looking for this and found nothing clear.
I wonder if i can mirror a space so alive entries are grabbed into database and release them when i take or delete an entry from the space, leave remain the table row in the database. This implies too, when space is loaded, read for mirroring only the entries that were up in the space before. How do I do or emule that? Thanks

{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=2701]{quote}

asked 2008-11-12 11:06:35 -0500

updated 2013-08-08 09:52:00 -0500

jaissefsfex's avatar
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

Let's see if this is what u want:
- evict objects from the space
- do not remove evicted objects from the database
- once space started load only the ones stored in the space before shut down.

Can u confirm this?

Shay

answered 2008-11-12 11:42:49 -0500

shay hassidim's avatar
edit flag offensive delete link more

Comments

Yes, so I can use the advantages of mirror service and too save forever the processed objects

scitelhta's avatar scitelhta  ( 2008-11-12 11:49:17 -0500 )edit

U can control the space object life cycle without removing it from the database by using finite lease when writing the object to the space or when updating it (see the lease parameter). Once the space object lease will expire it will be removed from the space but will not be removed from the database (mirror will not be called). There is some known issue with this mechanism (wrong data clean up) which got simple workaround. Send me email to shay@gigaspaces.com for the exact workaround description.

In terms of loading what the space had - u will need to query database with the relevant data u want to load. This means u need to implement the EDS initialLoad method.

I presume u don't want to lazy load data from the database (LRU cache policy) but run in ALL IN CACHE policy.

Shay

shay hassidim's avatar shay hassidim  ( 2008-11-12 12:07:19 -0500 )edit

Thank you so much, Shay. I kind of made the first part. Not so much documentation for the last one. I will just send you an email.

scitelhta's avatar scitelhta  ( 2008-11-12 15:59:35 -0500 )edit

XAP 6.6.2 include a fix that resolved the leak when having a space object with finite lease when the space having EDS: http://www.gigaspaces.com/wiki/displa...

GS-6047 When writing Non-transient entries to a space with an External Data Source, the expired entries are not cleaned by the space

Shay

shay hassidim's avatar shay hassidim  ( 2008-11-28 11:40:04 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2008-11-12 11:06:35 -0500

Seen: 95 times

Last updated: Nov 12 '08