Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-1939

Timestamp.MAX_VALUE is not UInt64 max value

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • bson-4.0.3
    • Affects Version/s: Not Applicable
    • Component/s: None

      Inserting Timestamp.MAX_VALUE results in mongo storing Timestamp(2147483647, 4294967295), i.e. 0x7FFFFFFF (2^31-1) and 0xFFFFFFFF (2^32-1).
       
      Shouldn't Timestamp.MAX_VALUE be Timestamp(4294967295,4294967295)?
       
      BSON Timestamps have a max value equal to UInt64 max value.
       
      I needed to work with Timestamp max value and thought this odd. Does MAX_VALUE have an alternative undocumented meaning?

            Assignee:
            daniel.aprahamian@mongodb.com Daniel Aprahamian (Inactive)
            Reporter:
            simony Simon Yarde
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: