GithubHelp home page GithubHelp logo

Comments (11)

bjori avatar bjori commented on July 19, 2024

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.

vlechemin avatar vlechemin commented on July 19, 2024

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.

bjori avatar bjori commented on July 19, 2024

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.

vlechemin avatar vlechemin commented on July 19, 2024

It was not in the uri, but in the options of the Client (2nd argument).

from mongo-php-library.

bjori avatar bjori commented on July 19, 2024

Can you post the actual line you constructed the Manager with?

It may have been a different bug.

from mongo-php-library.

jmikola avatar jmikola commented on July 19, 2024

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.

jmikola avatar jmikola commented on July 19, 2024

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.

vlechemin avatar vlechemin commented on July 19, 2024

@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.

jmikola avatar jmikola commented on July 19, 2024

@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.

vlechemin avatar vlechemin commented on July 19, 2024

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.

jmikola avatar jmikola commented on July 19, 2024

👍

from mongo-php-library.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.