[SERVER-1253] in Master-Master replication ismaster is 0 on both nodes Created: 18/Jun/10 Updated: 12/Jul/16 Resolved: 13/Jul/10 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 1.5.5 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Cheenu | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
all mongo versions |
||
| Attachments: |
|
| Operating System: | ALL |
| Participants: |
| Description |
|
Configured as per http://www.mongodb.org/display/DOCS/Master+Master+Replication Startup commands: But, neither node are master: ));" $/opt/mongodb-1.5.3/bin/mongo localhost:27018 --eval "printjson(db.\ $cmd.findOne( {ismaster:1}));" Michael Dirolf confirmed: |
| Comments |
| Comment by auto [ 14/Jul/10 ] |
|
Author: {'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}Message: more tests for ismaster |
| Comment by auto [ 14/Jul/10 ] |
|
Author: {'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}Message: fix ismaster for master/master |
| Comment by auto [ 13/Jul/10 ] |
|
Author: {'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}Message: in master/master ismaster should be 1 |
| Comment by Kazuki Ohta [ 03/Jul/10 ] |
|
Thanks for the comment! I want to know about your concern, if this patch leads to something bad. |
| Comment by Eliot Horowitz (Inactive) [ 03/Jul/10 ] |
|
We'll do something similar - need to test thoroughly before pushing though |
| Comment by Kazuki Ohta [ 03/Jul/10 ] |
|
The attached patch fixed the problem. kzk% ./mongo localhost:27017 --eval "printjson(db.\$cmd.findOne( {ismaster:1}));" kzk% ./mongo localhost:27018 --eval "printjson(db.\$cmd.findOne( {ismaster:1}));" Also confirmed that ScopedDbConnection correctly worked. kzk% g++ -I. -I/opt/local/include/ -L. -L/opt/local/lib/ -lmongoclient -lboost_thread-mt -lboost_system-mt test.cpp; ./a.out Finally, I also confirmed that ismaster shows the proper value in the master-slave configuration. Could you check the patch, and commit to the repository? I'm really happy if this patch is also applied to stable branch. Because we're now trying to use master-master replication in the production environment. Thanks in advance |
| Comment by Kazuki Ohta [ 03/Jul/10 ] |
|
This problem prevents using ScopedDbConnection for master-master replication. int catch (exception& e) { cerr << e.what() << endl; }} kzk% g++ -I. -I/opt/local/include/ -L. -L/opt/local/lib/ -lmongoclient -lboost_thread-mt -lboost_system-mt test.cpp; ./a.out |