Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-1006

splitKeysToFilter method is creating a bad query string.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P1
    • Resolution: Fixed
    • Affects Version/s: 0.3.0-incubating
    • Fix Version/s: 0.4.0
    • Component/s: io-java-mongodb
    • Labels:

      Description

      When you have a large number of documents in your mongo collection the splitKeysToFilter method is invoked.

      Currently Document{{_id= is prefixed to the query string

      { $and: [ {"_id":{$lte:Objectd("Document{{_id=564a0ad6e21b840001d75f5d}}")}} ]}

      This causes the document parse to fail with the following exception:

      Exception in thread "main" java.lang.IllegalArgumentException: invalid hexadecimal representation of an ObjectId: [Document{{_id=56e1ec546b2f0700015e61b2}}]

      This is caused by line 305

      String splitKey = splitKeys.get(i).toString();
      

      The code should use

      String splitKey = splitKeys.get(i).get("_id").toString();
      

      to just return the ID.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jbonofre Jean-Baptiste Onofré
                Reporter:
                davidb1385@gmail.com David Billings
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: