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

Ask Your Question
0

Mirror service not persisting

I'm following the wiki page http://www.gigaspaces.com/wiki/displa... to set up mirror service for the service grid. I have one GSM and two GSCs. The space that is mirrored is started by the process unit. It's also clustered. The mirror service started fine. And the mirrored space also started fine. It just that nothing is persisted when I checked the database. Any ideas?

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

asked 2008-03-20 18:55:49 -0600

noiseba gravatar image

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

jaissefsfex gravatar image
edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
0

answered 2008-03-21 06:54:09 -0600

shay hassidim gravatar image
edit flag offensive delete link more

Comments

Thanks, Shay. It worked after I modified the settings of my application according to the example. I still have a couple of questions though.

  • Does the processing unit have to run on a backup schema for mirror service to work? I think that's why my original settings weren't working.
  • I only want to mirror a small set of classes. It seems that classes are persisted by default. Do I need to add persist=false to all the classes that I don't want to mirror?

Thanks,

Simon

noiseba gravatar imagenoiseba ( 2008-03-21 11:40:57 -0600 )edit

+Does the processing unit have to run on a backup schema for mirror service to work? I think that's why my original settings weren't working.+ The Mirror requires a space with replication settings in order it will work. Single-space-non-clustered space cannot have a mirror. See wiki for details. This means you should use the partitioned-sync2backup , or the sync_replicated-cluster to use the mirror. The Mirror latest checkpoint preserved both at the primary space and the backup to ensure total coherency after primary failure. For your unit tests you can run a simple clustered space without having the backup running. This will still replicate the changes to the mirror.

+I only want to mirror a small set of classes. It seems that classes are persisted by default. Do I need to add persist=false to all the classes that I don't want to mirror?+ YES

Shay

shay hassidim gravatar imageshay hassidim ( 2008-03-21 11:48:04 -0600 )edit

I keep getting this error: UID must be supplied for write operation when using External Data-Source.

I understand what it's trying to say. But I'm not using a direct external data-source but mirror service instead. The class it's complaining about is something we don't want to persist. I've set persist=false flag on it. With all these being said, do I still need to supply a UID?

Thanks,

Simon

noiseba gravatar imagenoiseba ( 2008-03-21 13:16:04 -0600 )edit

Can you please share the full class definition (source)?

Guy

nirpaz gravatar imagenirpaz ( 2008-03-21 13:27:51 -0600 )edit

Here is a snip of the source:

@SpaceClass(fifo=true, persist=false) public class ServerToClientMessage implements Serializable { @SpaceId (autoGenerate=true) public String getID() { return m_id; } public void setID(String id) { m_id = id; } }

Once again, we do not want to persist this class. It's just a message that will be consumed with seconds.

Thanks.

noiseba gravatar imagenoiseba ( 2008-03-21 14:32:19 -0600 )edit
0

One last question:

Is there any way to make the default persist to be false instead of true in space class?

Thanks.

answered 2008-03-24 15:11:36 -0600

noiseba gravatar image
edit flag offensive delete link more

Comments

You can use gs.xml. The default in case you do not define the persistency mode is to persist Is there a problem declaring the persist=true annotation ? Shay

Edited by: Shay Hassidim on Mar 24, 2008 8:58 PM

shay hassidim gravatar imageshay hassidim ( 2008-03-24 19:57:47 -0600 )edit

There is no problem with persist=true. It's that I had to add persist=false to all the classes that I don't want to persist.

Simon

noiseba gravatar imagenoiseba ( 2008-03-25 15:38:37 -0600 )edit
0

Still have question about persist annotation.

answered 2008-03-25 17:10:47 -0600

noiseba gravatar image
edit flag offensive delete link more

Comments

We had to have a global default.
Since in many cases if a space is persistent , most of its objects will be persistent we decided to have the global default as persistent.

We will consider adding ability to change the global default.

Shay

shay hassidim gravatar imageshay hassidim ( 2008-03-25 18:34:01 -0600 )edit

That makes sense. Probably most of our classes will end up being persisted as well by the end of our development.

Thanks,

Simon

noiseba gravatar imagenoiseba ( 2008-03-25 19:10:59 -0600 )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-03-20 18:55:49 -0600

Seen: 110 times

Last updated: Mar 25 '08