Comments (11)
Can you paste an example code that results in this behavior?
We are aware of one case where this happened which is fixed now; https://jira.mongodb.org/browse/PHPC-441
But that case should be very bleeding edgecase you should never experience in an normal usage of the driver.
from mongo-php-library.
Thanks, I recompiled from master and it seems that it has been solved by this fix.
But I don't think it was an edge case.
the read preference used: new ReadPreference(ReadPreference::RP_NEAREST, [])
and the query was just a basic find([])
from mongo-php-library.
Interesting.
Were you connecting to a secondary directly? (e.g. not provding the "replicaSet=name" option to the uri?)
I guess we underestimated the impact of this issue :/
from mongo-php-library.
It was not in the uri, but in the options of the Client (2nd argument).
from mongo-php-library.
Can you post the actual line you constructed the Manager with?
It may have been a different bug.
from mongo-php-library.
recompiled from master
@vlechemin: Additionally, can you tell us what versions of the extension (actual release) and this library (commit hash would be fine) you were using?
I assume you were on 1.0.0beta2 of the extension, as there shouldn't be anything its master branch that would have affected read preference application unless this was actually an issue with the underlying C driver (we recently bumped things from 1.2.0rc0 to 1.2.0 final).
from mongo-php-library.
On second thought, this might have been PHPC-441, which was resolved with bumping the C driver to 1.2.0 final (and currently only in the extension's master branch). PHPLIB makes heavy use of these hinted queries, since we do server selection manually and then execute commands, queries, and writes directly on Server objects (instead of through the Manager).
from mongo-php-library.
@bjori, it was with the wrapper provided by the php lib:
new MongoDB\Client('mongodb://host1,host2/dbname', [
'replicaSet' => 'rsName',
'username' => 'user',
'password' => 'pwd',
])
hi @jmikola, it was the beta1 from this archive: https://s3.amazonaws.com/drivers.mongodb.org/hhvm/hhvm-mongodb-1.0beta1.tgz
and the version of the lib is: fbb10fe
from mongo-php-library.
@vlechemin: Thanks for confirming. The bump to libmongoc 1.2.0 was done after the HHVM driver's 1.0.0-beta1 release (see changelog). If you're willing to recompile its master branch and confirm that it solves the issue, that'd be appreciated. Otherwise, we should have a new HHVM tag cut later in the week for you to test with.
from mongo-php-library.
I think I misunderstood when you asked about the hash, the one for the driver is a89194261edbd1eb3fdb8cbf808a767866b29403 and had the commit about libmongoc 1.2.0.
Everything is working fine now, thank you
from mongo-php-library.
👍
from mongo-php-library.
Related Issues (20)
- PHP+MongoDB: "Return value must be of type MongoDB\Driver\Server, null returned" HOT 3
- Can we drop `jean85/pretty-package-versions:1.2`? HOT 4
- Decision about `mongo-orchestration` folder and `Makefile` HOT 3
- [Documentation] Syntax highlighting in the method reference is not ideal HOT 1
- A never-ending query after upgrade to MongoDB 6.0.3 HOT 6
- Memory leak on updateOne in the loop HOT 1
- Deprecated: Return type of MongoDB\Model\BSONDocument::bsonSerialize() HOT 2
- The StreamWrapper class is currently unusable without the bucket HOT 4
- Performance issue with PHP 8.2 HOT 2
- Extract mongodb-1.6.2.tgz error HOT 1
- MacOs M1 Cannot connect to Atlas After upgrade driver HOT 7
- This is a test
- $unset not properly work on multiple field? HOT 1
- Docs: missing `]` character in database->aggregate documentation HOT 1
- Can't connect. To mongo db remote in can bost HOT 1
- Non blocking io HOT 1
- $where is not allowed in this context HOT 2
- TLS connection with mongo cluster failed (while single host works) HOT 2
- getting result from mongodb with toArray() HOT 3
- Getting the error in driver version 1.14 HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mongo-php-library.