Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-337

Unique IDs generated with the Java MongoDB driver do not conform to the documentation

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 3.0.0
    • Affects Version/s: 2.5.3
    • Component/s: BSON
    • Labels:
      None
    • Fully Compatible

      Unique IDs generated with the Java MongoDB driver do NOT conform to the documentation both mongoDB generally and the javadoc included in the org.bson.types.ObjectID.

      In particular, machineID and processID is 4 bytes, not 5 and Increment is 4 bytes, not 3, as would be expected and is documented. Knowledge of the precise structure is relevant when the _id is being manually generated or specific bytes modified to still ensure (distributed) uniqueness. In short: Documentation does not match implementation.

            Assignee:
            Unassigned Unassigned
            Reporter:
            renegallati Rene Gallati
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: