Uploaded image for project: 'InsightEdge Platform'
  1. GS-13472

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

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects versions: None
    • Fix versions: None
    • Labels:
      None
    • Platform:
      All
    • SalesForce Case ID:
      11635
    • Sprint:
    • Edition:
      Open Source

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Yuvald Yuval Dori (Inactive)
              Participants of an issue:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: