Skip to content

Unrecognized field 'readConcern'  #516

@sautchenkov

Description

@sautchenkov

Hello!
We have 3 nodes of mongodb 3.2.11 with replication settings. And now using mongodb-1.2.0alpha3 driver installed via pecl. All working good. But we want to update library to stable version.

When we try to update mongodb driver to 1.2.3 stable, we begin to receive PHP fatal error:

2017/01/23 17:40:07 [error] 22364#22364: *49812 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught MongoDB\Driver\Exception\RuntimeException: Failed to parse: { getMore: 33073741133165, collection: "showcase_tree", readConcern: { level: "local" } }. Unrecognized field 'readConcern'. in /var/www/recommerce/models/mBaseModelNestedTree.php:527

We using latest mongo PHP library from Github.

Our connection string:

$this->client = new \MongoDB\Client(
'mongodb://'. $user .':'. $password .'@'. $hosts,
[
'connectTimeoutMS' => 2000,
'replicaSet' => 'rs0',
'w' => 1,
'wtimeoutMS' => 3000,
'journal' => 'false',
'readConcernLevel' => 'local',
'readPreference' => $this->default_read_preference
],
[
'typeMap' => ['root' => 'array', 'document' => 'array', 'array' => 'array']
]
);

When we try to comment 'readConcernLevel' => 'local' line our webapp start to work without fatal but very very slow.

Will glad for any help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions