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

Ask Your Question
0

Remoting routing incorrectly?

Hi!

I have this method:

void verify(@Routing Long id);

If I invoke this method with an id that's something low, for example 100, everything works great. The end object is and returns correctly from the space/partition.

If the id is really high, for example 6986832704440059829, I get error later in the stack when I try to update to object's verification status. It tells me that the object should not be in this partition.

Here is the exact message:

Operation is rejected - the routing value in the written entry of type 'com.company.User' does not match this space partition id. The value within the entry's routing property named 'id' is 6986832704440059829 which matches partition id 2 while current partition id is 1.

So far, we have done a workaround by creating wrapper classes around Long/Integer and also Strings(they suffer from this as well). But imo we shouldn't have to create wrappers, using java.lang.Long should work with any value.

So my question is, is this a bug? If so, will it be fixed? Or am I doing something wrong?

asked 2017-09-12 09:40:55 -0600

GS_User gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

Hi,

There are two different types of space proxies, local and clustered. The clustered proxy performs a broadcast read/write, while the local proxy only access the JVM in which it is running. An object with a routing value of 1 belongs in partition 1, so if it is written to partition 2 it will return the error you are seeing.

Try the following: space.getClustered().write(...)

See here: https://docs.gigaspaces.com/xap/12.1/...

answered 2017-09-18 07:26:48 -0600

Yuval gravatar image
edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2017-09-12 09:40:55 -0600

Seen: 57 times

Last updated: Sep 18