Skip to content
This repository has been archived by the owner on May 24, 2020. It is now read-only.

NoMethodError: undefined method `call' for Mongo::WriteConcern::Unacknowledged #3

Closed
zarqman opened this issue Mar 26, 2018 · 2 comments

Comments

@zarqman
Copy link

zarqman commented Mar 26, 2018

Hi there. Today I tried to upgrade an existing app to the latest versions of mongo-ruby and mongo_ha. This resulted in numerous NoMethodError exceptions, like the one shown below.

Generates errors:

  • mongo_ha 2.5.0
  • mongo 2.5.1
  • bson 4.3.0
  • ruby 2.4.3

Prior versions that ran successfully:

  • mongo_ha 2.4.2/0dc9055
  • mongo 2.4.3
  • bson 4.2.2

Let me know if there's anything I can do to help debug/test the issue.

NoMethodError: undefined method `call' for #<Mongo::WriteConcern::Acknowledged:0x00007f9583701e88>
--
 0: mongo_ha (2.5.0) lib/mongo_ha/retryable.rb:28:in `write_with_retry'
 1: mongo (2.5.1) lib/mongo/collection/view/writable.rb:295:in `block in update_one'
 2: mongo (2.5.1) lib/mongo/cluster.rb:515:in `with_session'
 3: mongo (2.5.1) lib/mongo/client.rb:449:in `with_session'
 4: mongo (2.5.1) lib/mongo/collection/view.rb:203:in `with_session'
 5: mongo (2.5.1) lib/mongo/collection/view/writable.rb:294:in `update_one'
 6: mongoid (6.2.1) lib/mongoid/query_cache.rb:182:in `update_one_with_clear_cache'
 7: mongoid (6.2.1) lib/mongoid/relations/touchable.rb:34:in `touch'
@reidmorrison
Copy link
Owner

It appears that between the mongo ruby driver 2.5.0 and 2.5.1 there were significant changes, including support for Mongo Sessions.

For now using mongo 2.5.0 will work. Researching how to fix the patching code to work with mongo 2.5.1

@reidmorrison
Copy link
Owner

Published mongo_ha gem version 2.5.1 that is compatible with mongoldb Ruby driver v2.5.1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants