Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-3855

KeyError: key not found: "X"

    • Type: Icon: Task Task
    • Resolution: Done
    • 5.0.0
    • Affects Version/s: None
    • Component/s: None
    • None

      At this line:

      Model.all.
        where(:locked => false).
        order(:id => :asc).
        find_and_modify({ '$set' => { :locked => true } }, :new => true)
      
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/bson-2.3.0/lib/bson/registry.rb:43:in `fetch'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/bson-2.3.0/lib/bson/registry.rb:43:in `get'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/bson-2.3.0/lib/bson/hash.rb:79:in `from_bson'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/connection.rb:133:in `block (2 levels) in read'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/connection.rb:132:in `times'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/connection.rb:132:in `each'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/connection.rb:132:in `map'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/connection.rb:132:in `block in read'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/connection.rb:221:in `with_connection'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/connection.rb:114:in `read'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/protocol/query.rb:213:in `receive_replies'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/connection.rb:152:in `block in receive_replies'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/connection.rb:151:in `map'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/connection.rb:151:in `receive_replies'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/node.rb:591:in `block (2 levels) in flush'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/node.rb:181:in `block in ensure_connected'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/node.rb:115:in `block in connection'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/connection_pool-2.0.0/lib/connection_pool.rb:58:in `with'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/node.rb:114:in `connection'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/node.rb:177:in `ensure_connected'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/node.rb:589:in `block in flush'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/node.rb:617:in `block in logging'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/notifications.rb:159:in `block in instrument'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/notifications.rb:159:in `instrument'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/instrumentable.rb:31:in `instrument'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/node.rb:616:in `logging'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/node.rb:587:in `flush'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/node.rb:391:in `process'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/operation/read.rb:48:in `execute'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/node.rb:648:in `read'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/node.rb:90:in `command'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/database.rb:73:in `block in command'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/cluster.rb:243:in `block in with_primary'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/node.rb:204:in `block in ensure_primary'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/executable.rb:25:in `execute'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/node.rb:203:in `ensure_primary'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/cluster.rb:242:in `with_primary'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/read_preference/primary.rb:55:in `block in with_node'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/read_preference/selectable.rb:65:in `call'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/read_preference/selectable.rb:65:in `with_retry'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/read_preference/primary.rb:54:in `with_node'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/database.rb:72:in `command'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/session.rb:83:in `command'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/query.rb:308:in `block in modify'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/session.rb:369:in `with'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/moped-2.0.0/lib/moped/query.rb:307:in `modify'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/mongoid-4.0.0/lib/mongoid/contextual/find_and_modify.rb:44:in `result'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/mongoid-4.0.0/lib/mongoid/contextual/mongo.rb:182:in `find_and_modify'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/mongoid-4.0.0/lib/mongoid/contextual.rb:20:in `find_and_modify'
      /var/www/crm.wegohealth.com/releases/20141108130316/lib/service/queue.rb:46:in `block in process'
      /var/www/crm.wegohealth.com/releases/20141108130316/lib/service/queue.rb:45:in `loop'
      /var/www/crm.wegohealth.com/releases/20141108130316/lib/service/queue.rb:45:in `process'
      /var/www/crm.wegohealth.com/releases/20141108130316/lib/service/queue.rb:26:in `block (5 levels) in perform'
      /var/www/crm.wegohealth.com/releases/20141108130316/lib/service/base.rb:127:in `with_error_handler'
      /var/www/crm.wegohealth.com/releases/20141108130316/lib/service/queue.rb:26:in `block (4 levels) in perform'
      /var/www/crm.wegohealth.com/releases/20141108130316/lib/service/queue.rb:25:in `loop'
      /var/www/crm.wegohealth.com/releases/20141108130316/lib/service/queue.rb:25:in `block (3 levels) in perform'
      /var/www/crm.wegohealth.com/releases/20141108130316/lib/service/base.rb:144:in `block in with_connection'
      /var/www/crm.wegohealth.com/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:294:in `with_connection'
      /var/www/crm.wegohealth.com/releases/20141108130316/lib/service/base.rb:144:in `with_connection'
      /var/www/crm.wegohealth.com/releases/20141108130316/lib/service/base.rb:133:in `with_connection'
      /var/www/crm.wegohealth.com/releases/20141108130316/lib/service/queue.rb:24:in `block (2 levels) in perform'
      /var/www/crm.wegohealth.com/releases/20141108130316/lib/mongoid/thread.rb:16:in `call'
      /var/www/crm.wegohealth.com/releases/20141108130316/lib/mongoid/thread.rb:16:in `block in initialize'
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            alexs Alexander S.
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: