[DOCS-14149] writeConcern w:0 with j:true doesn't work Created: 22/Jan/21 Updated: 30/Oct/23 Resolved: 31/Oct/22 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | manual, Server |
| Affects Version/s: | None |
| Fix Version/s: | Server_Docs_20231030 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Darshan Jayarama | Assignee: | Emet Ozar |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: | |
| Days since reply: | 1 year, 14 weeks, 2 days ago |
| Epic Link: | DOCSP-11701 |
| Description |
DescriptionHi Team, As per our documentation in writeConcern,
This is not allowed through any driver connectivity, because of java-driver, PyMongo throws error like below:
//Pymongo
But the same connection string works as expected from mongo shell:
Our documentation should be updated with these points that w:0 with j:true is not allowed if connection is from driver. Thanks, Scope of changesImpact to Other DocsMVP (Work and Date)Resources (Scope or Design Docs, Invision, etc.) |
| Comments |
| Comment by Education Bot [ 31/Oct/22 ] |
|
Hello! This ticket has been closed due to inactivity. If you believe this ticket is still important, please reopen it and leave a comment to explain why. Thank you! |
| Comment by Bernie Hackett [ 29/Jan/21 ] |
|
tl;dr, the driver behavior is correct, the shell behavior is wrong and really confusing. Raising an error is the correct behavior per the spec: When you configure any write concern other than w=0 you're asking the server to wait to complete some task before returning a result to the driver and therefore unblocking the application thread waiting for the response. Setting w=0, regardless of any other option, tells the server "don't send a response". So saying, "wait until the write is committed to the journal before responding, but also don't ever send me a response" makes no sense. Journaling has been enabled by default in the server since MongoDB 2.0, you don't have to explicitly tell the server to commit a write to the journal for it to happen. |
| Comment by Jeffrey Allen [ 26/Jan/21 ] |
|
Thanks very much Chris. I'm moving to blocked until we get more information. |