Topic
7 replies Latest Post - ‏2012-10-23T17:07:05Z by SystemAdmin
Erwin_Karbasi
Erwin_Karbasi
186 Posts
ACCEPTED ANSWER

Pinned topic wxsutils putAll method return value

‏2012-09-23T10:52:39Z |
Hello Experts,

We are using wxsutils putAll method from our WXS client app in order update entries were stored into the cache (i.e. updating the BSON value in the cache).
We have requested to write into side repository the failed update entries, but as i know the putAll method doesn't return these failed update keys.

As i sow the nested method putAll -> internalPutAll -> callReduceAgentAll returns the keys.

Is it possible to get the failed update keys from putAll method or is there any other method for above scenario?

Your insight would be highly appreciated.

Thanks in advance,
Erwin
Updated on 2012-10-23T17:07:05Z at 2012-10-23T17:07:05Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    1485 Posts
    ACCEPTED ANSWER

    Re: wxsutils putAll method return value

    ‏2012-09-24T01:40:39Z  in response to Erwin_Karbasi
    callReduceAgentAll doesn't return the keys but True or an exception per partition.

    There is no way currently to get the keys that failed.
    The easiest way to accomplish this with the given API is to
    1. partition the keys and values by partition
    2. perform a putAll for all key value pairs by partition
    If a partition fails, you know all the keys that failed.

    One could change the InsertAgent.reduceResults to create a new type of EntryErrorValue which has a list of failed partitions and return that if at least one exists.
    • Erwin_Karbasi
      Erwin_Karbasi
      186 Posts
      ACCEPTED ANSWER

      Re: wxsutils putAll method return value

      ‏2012-09-24T08:10:05Z  in response to SystemAdmin
      Hi Michael,

      Thank you for your direction.

      According our requirement we cannot partition the keys and values by partition.
      I thought to do getAll after each putAll method in order indicating the updating successful.

      Thanks,
      Erwin
      • Erwin_Karbasi
        Erwin_Karbasi
        186 Posts
        ACCEPTED ANSWER

        Re: wxsutils putAll method return value

        ‏2012-09-24T12:30:04Z  in response to Erwin_Karbasi
        Hi Michael,

        Since each gatAll after putAll can affect on performance we'd prefer to get indication about the status of each chunk that we pass to the putAll method i.e. true/false/exception.
        Do we need open PMR for above request?

        Your direction would be highly appreciated,
        Erwin
        • Erwin_Karbasi
          Erwin_Karbasi
          186 Posts
          ACCEPTED ANSWER

          Re: wxsutils putAll method return value

          ‏2012-09-29T16:54:27Z  in response to Erwin_Karbasi
          Your assistance about this issue would be highly appreciated.

          Thanks in advance,
          Erwin
          • SystemAdmin
            SystemAdmin
            1485 Posts
            ACCEPTED ANSWER

            Re: wxsutils putAll method return value

            ‏2012-10-23T15:34:39Z  in response to Erwin_Karbasi
            I just pushed a set of source changes (no binaries) to test out this capability.
            If there is a failure on putAll or insertAll, the ObjectGridRuntimeException will have a nested exception called FailedKeysException. You can get the keys and EntryErrorValues that had failures.
            • Erwin_Karbasi
              Erwin_Karbasi
              186 Posts
              ACCEPTED ANSWER

              Re: wxsutils putAll method return value

              ‏2012-10-23T16:19:40Z  in response to SystemAdmin
              Hello Michael,

              Thank you a lot for update and great job, I highly appreciate your assistance.
              We'll check your update in the source code.

              Do you mean to add this to binaries, since we need the binaries (jar file) to it to our dependencies.

              Thanks a lot again,
              Erwin
              • SystemAdmin
                SystemAdmin
                1485 Posts
                ACCEPTED ANSWER

                Re: wxsutils putAll method return value

                ‏2012-10-23T17:07:05Z  in response to Erwin_Karbasi
                I will eventually add the binaries once the behavior is correct. I dislike re-releasing a version while trying to get function working. When I snap a release, I will never reuse that number.