You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dan: I'm willing to put some effort into fixing, but I'm afraid I'm unsure how to translate the deprecated calls into the new form. Namely, can the deprecation warning suggestions be trusted?
E.g.,
# # The 'save' method will be removed in a future major release.
# # Use 'replace_one' with upsert instead.
# # MongoDB::Collection::save called at /home/scot/.cpanm/work/1481142009.116534/Meerkat-0.014/blib/lib/Meerkat/Collection.pm line 330`
When I look at Collection.pm:330 I see:
return $self->_try_mongo_op( sync => sub { !!$self->_mongo_collection->save($pack) }
Looking at the MongoDB::Collection documentation I see replace_one, so would it be as simple as:
return $self->_try_mongo_op( sync => sub { !!$self->_mongo_collection->replace_one($pack, {upsert => 1})
EDIT:
I've done some initial trials but the changes seem to be more elaborate behind the scenes and I haven't got the tests in basic.t to pass yet. I want to continue to use Meerkat, so I'll keep plinking at it, but would appreciate any help or guidance you can provide on how to move forward with the new MongoDB client changes.
Thanks for reminding me of the deprecation warnings. I'll tackle the deprecation warnings within the next week. Longer term, "save" and 'replace_one' have race conditions and I need to think about how to add a "safe" mode that does a two-phase commit or optimistic concurrency control or something like that.
Build log attached
meerkat.build.log.txt
follows:
The text was updated successfully, but these errors were encountered: