[SERVER-11268] Allow configuring write concern in moveChunk Created: 18/Oct/13 Updated: 10/Dec/14 Resolved: 07/Mar/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 2.4.6 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Kihyun Kim | Assignee: | Randolph Tan |
| Resolution: | Done | Votes: | 1 |
| Labels: | sharding | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
|||||||||||||||||||||||||||
| Operating System: | ALL | |||||||||||||||||||||||||||
| Steps To Reproduce: | Simply, Deploy sharded cluster with some replica sets. I used 2 replica set with 2 standard nodes and 1 arbiter.
Then just kill one of standard node. (I killed the mongd using port 26202)
|
|||||||||||||||||||||||||||
| Participants: | ||||||||||||||||||||||||||||
| Description |
|
In a sharded cluster with replica sets, if any standard node goes down, when run command "moveChunk" or create sharded collection with "hashed" key, the operation does not end. The weak replica set's primary node shows below on log file.
I tried this for 2.4.2 but It works well. This happens only 2.4.6. |
| Comments |
| Comment by Greg Studer [ 07/Mar/14 ] |
|
There is an option to change the behavior of migrations for non-critical writes (secondaryThrottle), but changing the write concern in this way is dangerous - rollbacks can affect migrated data if it isn't replicated to a majority of members at the critical section. > I think the sharded cluster must work in spite of replica set weakness because there is an opLog. |
| Comment by Kihyun Kim [ 22/Oct/13 ] |
|
Thank you for your comment. I just found a document "chunk migration write concern". http://docs.mongodb.org/manual/core/sharding-chunk-migration/#chunk-migration-write-concern |
| Comment by Randolph Tan [ 21/Oct/13 ] |
|
Hi, The moveChunk command is waiting for the updates to be updated to the majority of the members that stores data in the set. The example you gave above does not satisfy this condition. This is basically the same as doing an insert and calling getLastError with w = majority. Hope that helps. |