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

Ask Your Question
0

Manual eviction issue

Hi,

For a persistent space(synchronous persistence not mirror), we have a process that 1. receives data 2. if received data is valid, clears old data in space (we want this to get propagated to database as well, but that is not happening) 3. insert new data

We are running this process in a transaction. I understand step 2 is not propagating to database as mentioned in the last point in section 'Explicit Eviction of Objects from the Space' on http://www.gigaspaces.com/wiki/displa... .

+It's important to note the following about the TakeModifiers.EVICT_ONLY modifier:

It can be used with any take operation - take, takeById, takeMultiple, etc. It can be used only with LRU policy. Starting with XAP 8.0.2 it is supported with the ALL_IN_CACHE policy as well. When using this modifier, the timeout argument in operations that allow to specify a timeout is ignored. The operations will always return immediately. When using this modifier, the take or clear calls will never be propagated to the underlying database (EDS layer) when running in synchronous or asynchronous persistency mode. A take operation for example might return a null while a matching object exists in the underlying database. The TakeModifiers.EVICT_ONLY is ignored when used in a transactional operation - A take or clear in the context of a transaction will not result eviction.+

Is there a work-around to get this working?

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

asked 2011-07-26 22:13:32 -0500

asirohi gravatar image

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

jaissefsfex gravatar image
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

Please report this to support.
Sounds like you have similar issue like //question/1105/manual-eviction-problem-v712/&tstart=0
Shay

answered 2011-07-28 03:02:30 -0500

shay hassidim gravatar image
edit flag offensive delete link more
0

Or maybe what we are trying to do shouldn't be done? why isn't deleting from db not allowed in a transactional operation? Do please let me know your thoughts.

many thanks!

answered 2011-07-27 00:49:47 -0500

asirohi gravatar image
edit flag offensive delete link more

Comments

Odd thing is that expected behavior as per documentation is:

  1. For transactional methods, eviction should not work.
  2. With or without transaction, objects shouldn't be evicted from database.

2 is not true. The moment transaction management is removed, evictions work like a charm, propagating to database, and everything. Am I missing something here?

asirohi gravatar imageasirohi ( 2011-07-27 02:40:55 -0500 )edit

To give you some more details, we are using ALL_IN_CACHE and gigaspaces-xap-premium-8.0.1-ga.

What I would like to do ideally is continue using transactioning, and get my evictions working.

asirohi gravatar imageasirohi ( 2011-07-27 02:44:01 -0500 )edit

But Shay I am more interesting in understanding why has gigaspaces decided this behavior? ie eviction is not allowed from transactional operations.

asirohi gravatar imageasirohi ( 2011-07-28 03:07:03 -0500 )edit

The reason for not supporting transactional eviction is the fact that internally the take+Eviction operation is atomic and you can't bind it into other operations. It must stand by its own.
Shay

shay hassidim gravatar imageshay hassidim ( 2011-07-29 07:45:02 -0500 )edit

I see. Thanks a lot for the explanation, Shay.

asirohi gravatar imageasirohi ( 2011-07-31 23:04:57 -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: 2011-07-26 22:13:32 -0500

Seen: 36 times

Last updated: Jul 27 '11