Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-2787

Upgrading to 1.8.0 and enabling journaling causing cryptic "_a != -1" error

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.8.1, 1.9.0
    • Affects Version/s: 1.8.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      Mac OSX 10.6.6
      Ruby 1.9.2-p0
      Mongoid 2.0.0.beta20
      Mongo Ruby Driver 1.2.4
    • OS X

      I'm starting the process of vetting our software with MongoDB 1.8. I had been running MongoDB 1.6.0 on my Mac (which we also currently run in production). Today I installed MongoDB 1.8.0 and pointed it at the data files that had been created with 1.6.0. All of my tests passed and everything seemed fine.

      Then I enabled journaling (--journal). Once I did this, one of my tests started failing with this message:

      Failures:
      1) SaveWave::Model::MongoDB::Upc should create
      Failure/Error: @upc = Factory.create(:upc)
      : _a != -1

      1. ./spec/integration/mongodb/upc_spec.rb:13:in `block (2 levels) in <top (required)>'

      2) SaveWave::Model::MongoDB::Upc should update
      Failure/Error: @upc = Factory.create(:upc)
      : _a != -1

      1. ./spec/integration/mongodb/upc_spec.rb:13:in `block (2 levels) in <top (required)>'

      3) SaveWave::Model::MongoDB::Upc should destroy
      Failure/Error: @upc = Factory.create(:upc)
      : _a != -1

      1. ./spec/integration/mongodb/upc_spec.rb:13:in `block (2 levels) in <top (required)>'

      When I turn off journaling, the test passes. Line 13 of the test where it keeps failing is:

      before :each do
      @upc = Factory.create(:upc) # <-- Line 13
      end

      And the relevant FactoryGirl definition is:

      Factory.define :upc, :class => SaveWave::Model::MongoDB::Upc do |upc|
      upc.name "Coca Cola"
      upc.active true
      upc.start_date DateTime.civil(2010, 10, 1, 0, 0, 0)
      upc.end_date DateTime.civil(2011, 9, 30, 11, 59, 59)
      upc.identifier "8395837859183"
      upc.excluded_states ["MA", "OR"]
      end

      Nothing obvious pops out here. Let me know if there's any more info I can provide to help debug this.

            Assignee:
            aaron Aaron Staple
            Reporter:
            bploetz Brian Ploetz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: