Skip to content

MongoDB 3.6 --> Mongo::Error::OperationFailure: Unknown modifier: $pushAll #189

@Startouf

Description

@Startouf

It seems that the $pushAll operator was removed in MongoDB 3.6, making systematic crashes when trying to update an uploader

My gem/server versions

  • MongoDB server v3.6.11
  • mongoid 6.1.1
  • mongo 2.6.2
  • Rails/activesupport 5.0.5

Here is a full stack trace. At first sight it doesn not seem related to mongoid carrierwave, but the bug only occurs when I try to add an image file so I'm not sure what to think of it

Mongo::Error::OperationFailure: Unknown modifier: $pushAll (9)
	from /websites/hermes-production/shared/bundle/ruby/2.3.0/gems/mongo-2.6.2/lib/mongo/operation/result.rb:267:in `raise_operation_failure'
	from /websites/hermes-production/shared/bundle/ruby/2.3.0/gems/mongo-2.6.2/lib/mongo/operation/result.rb:263:in `validate!'
	from /websites/hermes-production/shared/bundle/ruby/2.3.0/gems/mongo-2.6.2/lib/mongo/operation/shared/write.rb:42:in `execute'
	from /websites/hermes-production/shared/bundle/ruby/2.3.0/gems/mongo-2.6.2/lib/mongo/collection/view/writable.rb:307:in `block (2 levels) in update_one'
	from /websites/hermes-production/shared/bundle/ruby/2.3.0/gems/mongo-2.6.2/lib/mongo/retryable.rb:158:in `legacy_write_with_retry'
	from /websites/hermes-production/shared/bundle/ruby/2.3.0/gems/mongo-2.6.2/lib/mongo/retryable.rb:106:in `write_with_retry'
	from /websites/hermes-production/shared/bundle/ruby/2.3.0/gems/mongo-2.6.2/lib/mongo/collection/view/writable.rb:295:in `block in update_one'
	from /websites/hermes-production/shared/bundle/ruby/2.3.0/gems/mongo-2.6.2/lib/mongo/cluster.rb:524:in `with_session'
	from /websites/hermes-production/shared/bundle/ruby/2.3.0/gems/mongo-2.6.2/lib/mongo/client.rb:550:in `with_session'
	from /websites/hermes-production/shared/bundle/ruby/2.3.0/gems/mongo-2.6.2/lib/mongo/collection/view.rb:204:in `with_session'
	from /websites/hermes-production/shared/bundle/ruby/2.3.0/gems/mongo-2.6.2/lib/mongo/collection/view/writable.rb:294:in `update_one'
	from /websites/hermes-production/shared/bundle/ruby/2.3.0/gems/mongoid-6.1.1/lib/mongoid/query_cache.rb:182:in `update_one_with_clear_cache'
	from /websites/hermes-production/shared/bundle/ruby/2.3.0/gems/mongoid-6.1.1/lib/mongoid/persistable/updatable.rb:137:in `block in update_document'
	from /websites/hermes-production/shared/bundle/ruby/2.3.0/gems/mongoid-6.1.1/lib/mongoid/persistable/updatable.rb:112:in `block (2 levels) in prepare_update'
	from /websites/hermes-production/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.5/lib/active_support/callbacks.rb:126:in `call'
	from /websites/hermes-production/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.5/lib/active_support/callbacks.rb:506:in `block (2 levels) in compile'
... 8 levels...
	from /websites/hermes-production/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.5/lib/active_support/callbacks.rb:455:in `call'
	from /websites/hermes-production/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.5/lib/active_support/callbacks.rb:101:in `__run_callbacks__'
	from /websites/hermes-production/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.5/lib/active_support/callbacks.rb:750:in `_run_save_callbacks'
	from /websites/hermes-production/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.5/lib/active_support/callbacks.rb:90:in `run_callbacks'
	from /websites/hermes-production/shared/bundle/ruby/2.3.0/gems/mongoid-6.1.1/lib/mongoid/interceptable.rb:132:in `run_callbacks'
	from /websites/hermes-production/shared/bundle/ruby/2.3.0/gems/mongoid-6.1.1/lib/mongoid/persistable/updatable.rb:110:in `prepare_update'
	from /websites/hermes-production/shared/bundle/ruby/2.3.0/gems/mongoid-6.1.1/lib/mongoid/persistable/updatable.rb:132:in `update_document'
	from /websites/hermes-production/shared/bundle/ruby/2.3.0/gems/mongoid-6.1.1/lib/mongoid/persistable/savable.rb:25:in `save'
	from (irb):38
	from /websites/hermes-production/shared/bundle/ruby/2.3.0/gems/railties-5.0.5/lib/rails/commands/console.rb:65:in `start'
	from /websites/hermes-production/shared/bundle/ruby/2.3.0/gems/railties-5.0.5/lib/rails/commands/console_helper.rb:9:in `start'
	from /websites/hermes-production/shared/bundle/ruby/2.3.0/gems/railties-5.0.5/lib/rails/commands/commands_tasks.rb:78:in `console'
	from /websites/hermes-production/shared/bundle/ruby/2.3.0/gems/railties-5.0.5/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
	from /websites/hermes-production/shared/bundle/ruby/2.3.0/gems/railties-5.0.5/lib/rails/commands.rb:18:in `<top (required)>'
	from bin/rails:14:in `require'
	from bin/rails:14:in `<main>'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions