Skip to content
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

Remove the hard-coded writeConcern #380

Merged
merged 1 commit into from
Jun 28, 2017
Merged

Conversation

raymondfeng
Copy link
Contributor

@raymondfeng raymondfeng commented Jun 28, 2017

{w: 1} is not always valid.
See https://docs.mongodb.com/manual/reference/write-concern/#write-concern

Description

When performing a PUT operation from Loopback app to compose for mongo instance, it throws exception:

{"error": {
   "name": "MongoError",
   "status": 500,
   "message": "w: 'majority' is the only valid write concern when writing to config server replica sets, got: { w: 1, wtimeout: 0 }",
   "ok": 0,
   "errmsg": "w: 'majority' is the only valid write concern when writing to config server replica sets, got: { w: 1, wtimeout: 0 }",
   "code": 2
}}

Related issues

  • None

Checklist

  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style
    guide

Copy link
Contributor

@jannyHou jannyHou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nitpick to get CI commit lint pass:

242f560 - Remove the hard-coded writeConcern: line 4 longer than 72 characters.

@raymondfeng
Copy link
Contributor Author

@jannyHou Thanks for the review. I don't think it makes sense to split the http url in 2 lines. I'll use the admin right to merge it.

@raymondfeng raymondfeng merged commit 466f4b5 into master Jun 28, 2017
@kequarles
Copy link

This pull request is associated with Bluemix support ticket https://jazzop27.rtp.raleigh.ibm.com:9443/ccm/web/projects/CloudOE#action=com.ibm.team.workitem.viewWorkItem&id=484915, which I have taken ownership of to monitor (in my current role as Gateway Director squad rep for the support interrupt role), as Raymond does not have access to jazzop27 (RTC repository). @raymondfeng What can be communicated in the ticket (=> to the customer by support) regarding when the customer can expect to benefit from your fix?

@raymondfeng
Copy link
Contributor Author

@kequarles The PR should fix the issue described above as reported by the customer.

@kequarles
Copy link

Per Slack conversation, Raymond confirmed that the fix is available in NPM, and the customer can obtain it by executing "npm i loopback-connector-mongodb@^3.2.0 --save" to update the dependency for the loopback app. I've updated the ticket with this info, for support to relay to the customer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants