ObjectId.GenerateNewId() Generates Invalid Id Randomly

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Cannot Reproduce
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: BSON
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      There seems to be a moment in a day or every few days, where the ObjectId.GenerateNewId() generates a 23 length ID, and fails to Parse.
      We noticed this error live, and I was able to reproduce this error in leaving a test running all day, where i would call ObjectId.GenerateNewId(), and parse it to an ObjectId. It seems to randomly return a 23 length ID at different times on different days, which of course wont parse.

      The error and a sample Invalid id:
      System.FormatException: '590262767c771f2b986a59b' is not a valid 24 digit hex string.
      at MongoDB.Bson.ObjectId.Parse(String s)

        1. screenshot-1.png
          75 kB
          Dale Cameron
        2. screenshot-2.png
          44 kB
          Dale Cameron

            Assignee:
            Robert Stam (Inactive)
            Reporter:
            Dale Cameron
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: