New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed: calling getLastError against mongos (router) won't return conn… #1246

Merged
merged 1 commit into from Sep 11, 2015

Conversation

Projects
None yet
2 participants
@alvinsay
Contributor

alvinsay commented Sep 4, 2015

When getLastError is called against mongos (sharding router) instead of mongodb instance, the returned JSON won't contains connectionId field, and vibe.d's mongo driver will throw an exception.

Example response of getLastError against mongos:

mongos> db.runCommand("getlasterror")
{
        "err" : "E11000 duplicate key error index: test.test.user.$_id_ dup key: { : 1.0 }",
        "code" : 11000,
        "n" : 0,
        "singleShard" : "db0:30001",
        "ok" : 1
}

For more information about mongos,
please check https://docs.mongodb.org/v3.0/reference/program/mongos/

s-ludwig added a commit that referenced this pull request Sep 11, 2015

Merge pull request #1246 from Rayark/fix-mongos
fixed: calling getLastError against mongos (router) won't return conn…

@s-ludwig s-ludwig merged commit b0f329f into vibe-d:master Sep 11, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment