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

Ask Your Question

Error during replication

Processor with replicated space was deployed to two hosts. After starting feeder (the default one from "data" examples) the following error is logged repeatedly (on every data sending from feeder):

+processor [1] SEVERE [com.gigaspaces.replication.channel.space2.sync.space1] - Replication detected conflicting Take operation on entry - <java.lang.object> uid=<a1^1313518868073^665>+ +Symptom: Entry not in space+ +Ignoring the conflicting operation since it has already been applied to space [space_container1:space].+ +Please make sure that the entry was not simultaneously changed in two different space instances.+

What should be changed to resolve conflict? Thanks in advance.

Config and code attached. h4. Attachments





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

asked 2011-08-16 13:37:52 -0600

max_tyukh gravatar image

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

jaissefsfex gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

- The URL should within the pu.xml should not include the cluster schema. This is injected via the sla.xml or via the deploy parameters. It should be: /./space
- Sync-replicated cluster schema should not be used when there is a risk to modify / remove the same object in the same time at both ends.
- To scale the space you should run it in partitioned cluster schema. In such a case each polling container will be processing its colocated partition data.
- If there is a need for a polling container to use data that might be located within a different partition it should use a clustered proxy together with the colocated one.


answered 2011-08-17 14:25:01 -0600

shay hassidim gravatar image
edit flag offensive delete link more


Shay, thanks a lot for your reply.

My goals are:
- to get the data replicated to all hosts in the cluster
- to have the same processor logic working with the same data

For obtaining these goals the best approach is to use cluster with replication schema. Is this correct?

From you reply:
> Sync-replicated cluster schema should not be used when there is a risk to modify / remove the same object in the same time at both ends.
In order to use sync-replicated schema polling container should not write modified data back to the space. Is this correct?

max_tyukh gravatar image max_tyukh  ( 2011-08-18 09:32:42 -0600 )edit

Why you would like to have all your hosts to have the entire data replicated on each host?
Do you need the data on each box to improve read operations performance?
Having multiple copies of your data means that data update operations will be relatively expensive – especially with synchronous replication as the activity (write/update/take) will be completed only after all replica copies will be accepting and acknowledge the operation (together also with the primary space that interacts with the client application).
If you would like to speed up read operations but avoid the overhead of the sync-replication , a local cache/view might be a better option.
If you would like to have your processing logic to run on each machine it does not make sense these to process the same data (that’s why sync-replicated does not make sense). In such a case a partitioned space that will be splitting the data across the partitions (that will be running on different machines) would make more sense. That’s a much more popular architecture that allows you to process data in parallel and utilize your hosts in the more optimal manner.

Another problem with sync-replicated is locking. You will need to ensure that a consumed object is processed only by one of the polling containers (that's the problem you are having). To do that you will have to place a distributed lock that will be visible to all polling containers. This is relatively expensive activity. Partitioning the data avoiding this problem.


shay hassidim gravatar image shay hassidim  ( 2011-08-18 10:45:30 -0600 )edit

Hello Max,

My name is Guy and i am a Solution architect working in europe, i will be happy to assist you in getting the best architecture for your requirments. please contact me at my email guyl@gigaspaces.com so this discussion will be more productive.


dragnot gravatar image dragnot  ( 2011-08-18 21:45:08 -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


Asked: 2011-08-16 13:37:52 -0600

Seen: 171 times

Last updated: Aug 17 '11