We're updating the issue view to help you get more done. 

Wrong error message when using partial update together with update or write

Description

I was trying to write an object to the grid using Gigaspace.writeMultiple method which takes in WriteModifiers as an argument. I was passing UPDATE_OR_WRITE along with PARTIAL_UPDATE in WriteModifiers argument. However it kept failing with below error:

Caused by: java.lang.IllegalArgumentException: Illegal modifiers - cannot use WRITE_ONLY with PARTIAL_UPDATE.
at com.gigaspaces.internal.client.spaceproxy.SpaceProxyImpl.initWriteModifiers(SpaceProxyImpl.java:574)
at com.gigaspaces.internal.client.spaceproxy.actioninfo.WriteMultipleProxyActionInfo.<init>(WriteMultipleProxyActionInfo.java:43)
at com.gigaspaces.internal.client.spaceproxy.actions.AbstractSpaceProxyActionManager.writeMultiple(AbstractSpaceProxyActionManager.java:386)
at com.gigaspaces.internal.client.spaceproxy.AbstractSpaceProxy.writeMultiple(AbstractSpaceProxy.java:472)
at org.openspaces.core.DefaultGigaSpace.writeMultiple(DefaultGigaSpace.java:1517)
at org.openspaces.core.DefaultGigaSpace.writeMultiple(DefaultGigaSpace.java:1493)

Here's the code that caused this exception:

gigaSpace.writeMultiple(assetsData.toArray(), WriteModifiers.PARTIAL_UPDATE.add(WriteModifiers.UPDATE_OR_WRITE));

Also tried this,

gigaSpace.writeMultiple(assetsData.toArray(), WriteModifiers.UPDATE_OR_WRITE.add(WriteModifiers.PARTIAL_UPDATE));

but it was failing with the same exception.

The exception message says WRITE_ONLY is not allowed with PARTIAL_UPDATE, however the code is clearly using UPDATE_OR_WRITE, and not WRITE_ONLY.

Workaround

None

Acceptance Test

None

Status

Assignee

Unassigned

Reporter

Yuval Dori

Labels

None

Priority

Minor

SalesForce Case ID

11635

Fix versions

None

Commitment Version/s

None

Due date

None

Product

None

Edition

Open Source

Platform

All