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

Ask Your Question
0

Remoting serivce route incorrectly?

Hi!

I have this method in my remoting interface:

void create(@Routing("getId") User user);

getId returns a java.lang.Long object.

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

If the id is really high, for example 6986832704440059829, I get an error later in the stack when I try to create the object. 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) and implementing a custom hashCode(java.util.Objects.hash).

But it feels wrong with this worwkaround. java.lang.Long for example 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:49:20 -0600

GS_User gravatar image
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

Hi, Which version are you using? Similar issue was fixed in 11 version.

Regards, Ester.

answered 2017-09-17 06:39:38 -0600

Ester gravatar image
edit flag offensive delete link more
0

I using 12.1.0 version.

I have a CompositeKey (with 8 properties) as SpaceId and implemented hashCode method in the CompositeKey.

With this setup, I'm facing similar problem. Her's the exception that I got:

com.gigaspaces.client.protective.ProtectiveModeException: Operation is rejected - the routing value in the written entry of type 'com.myweb.MySpaceEntity' does not match this space partition id. The value within the entry's routing property named 'compositeKey' is 7313b4cf-b0a7-4e48-84cc-45d5d061b039|8767|YY|XYZ|1|AS9872|2017-11-22|X which matches partition id 1 while current partition id is 2.

answered 2017-11-08 19:15:02 -0600

VJS 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

1 follower

Stats

Asked: 2017-09-12 09:49:20 -0600

Seen: 217 times

Last updated: Sep 17