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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 3.0.0
    • 2.5.3
    • BSON
    • None
    • Fully Compatible

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: