[SERVER-1847] ReplicaSet configuration is not yet initialized when the server start to accept connections. Created: 24/Sep/10 Updated: 12/Jul/16 Resolved: 28/Sep/10 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | 1.6.3 |
| Fix Version/s: | 1.7.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Louis Opter | Assignee: | Kristina Chodorow (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Linux 2.6.34.2 with Ubuntu Lucid Lynx userland, mongodb package from 10genĀ on a dual core 64bits EC2 server. (m1.large) |
||
| Attachments: |
|
| Operating System: | Linux |
| Participants: |
| Description |
|
Given an empty mongodb server launched with --replSet. If you immediately run rs.initiate(); when the server start to accept connections on port 27017 the command fails. A quick look over the source code show that at this time ReplSet::startupStatus is different from ReplSet::EMPTYCONFIG as it should be. If you wait 5 seconds after the server start to accept connections to run the command then it succeed. I expect the command to succeed as soon as the server start to accept connections. It breaks automation scripts. Please find attached the console output. |
| Comments |
| Comment by auto [ 20/Nov/10 ] |
|
Author: {'login': 'kchodorow', 'name': 'Kristina Chodorow', 'email': 'kristina@10gen.com'}Message: set empty config asap on startup |
| Comment by Kristina Chodorow (Inactive) [ 28/Sep/10 ] |
|
You should be able to initialize immediately, now. |
| Comment by auto [ 28/Sep/10 ] |
|
Author: {'login': 'kchodorow', 'name': 'Kristina Chodorow', 'email': 'kristina@10gen.com'}Message: set empty config asap on startup |
| Comment by Louis Opter [ 24/Sep/10 ] |
|
Just realized that in this case rs.initiate fails even after a sleep of 5 seconds. I will provide a new typescript wich clearly show that it works after a sleep. Edit: new typescript attached with a sleep of 10 seconds instead of 5. |