Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-296

Timestamp with bson_ext

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.4.0
    • Affects Version/s: None
    • Component/s: None
    • None

      From a user:

      Hello, I have the following problem with bson_ext:

      I'm trying to poll oplog with tailable cursor. To skip already processed records in case when everything fails (cursor need to be re-queried), I have to persist last processed record's timestamp somewhere (obviously, in mongo). When bson_ext is not used, everything works fine.

      When I use bson_ext, starting from some value some strange things happens with the seconds of the timestamp I save into database using native serializer.
      Here are sympthoms:
      beginning from some value near 10^6-7 (which makes me think there is something about integer overflow) seconds field values begin to differ for native serialization and Ruby one. What is fancier, that on Linux (Debian) and Windows
      overflown
      values for bson_ext are different.

      Can someone tell me, what can be done about that and can something be done at all? For now speed of Ruby serialization is sufficient, but it would be nice to have maximum performance.

      I can provide more information and tests code if required.

            Assignee:
            kbanker Kyle Banker
            Reporter:
            kbanker Kyle Banker
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: