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

lock! does not flush all pending writes to the db

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • 12_01_17
    • Affects Version/s: 1.5.2
    • Component/s: None
    • Labels:
    • Environment:
      Mac OSX Lion, Mongo 2.0.2, Ruby Driver 1.5.2, Rails 2.3.11, RSpec 1.3.0

      I am having issues whereby writes to a collection followed by immediate reads from that collection do not return (a subset of) the writes just made. I understand writes to the db are asynchronous, hence I performed a db.lock! operation before reading the collection.

      As I understand, the lock! operation should flush all writes to the datafile, and then lock the database. However, even after the lock! operation, subsequent find operations from the collection sometimes do not render all the items that were written to the collection before the lock!.

      I am running this test within Rspec.

            Assignee:
            kbanker Kyle Banker
            Reporter:
            tislammac Tariq Islam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: