[SERVER-4452] Race condition when adding hosts to a replica set Created: 08/Dec/11 Updated: 15/Aug/12 Resolved: 07/Mar/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Trivial - P5 |
| Reporter: | Victor G Estevez | Assignee: | Kristina Chodorow (Inactive) |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Participants: |
| Description |
|
rs.reconfig() blindly updates the version to the current version + 1. This makes sense if the user doesn't specify a version already, however if the user is providing the version it should be respected. This can lead to race conditions where two or more users update and overwrite each others changes. I've verified that replSetReconfig command does the right thing (both anecdotaly and in code https://github.com/mongodb/mongo/blob/master/db/repl/rs_config.cpp#L244-248). |
| Comments |
| Comment by Kristina Chodorow (Inactive) [ 08/Mar/12 ] |
|
No, because it broke things (and I never heard back from you about the contributor agreement). |
| Comment by Victor G Estevez [ 08/Mar/12 ] |
|
Was this the right resolution? As far as I can tell my patch was accepted into master. |
| Comment by Kristina Chodorow (Inactive) [ 08/Dec/11 ] |
|
Can you please sign the contributor agreement: http://www.10gen.com/contributor |
| Comment by Victor G Estevez [ 08/Dec/11 ] |
|
I've submitted a pull request with the bugfix: https://github.com/mongodb/mongo/pull/150 |