[SERVER-26335] Initial sync with buildIndexes=false fails Created: 26/Sep/16  Updated: 25/Jan/17  Resolved: 27/Sep/16

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 3.3.14
Fix Version/s: 3.3.15

Type: Bug Priority: Blocker - P1
Reporter: Timothy Olsen (Inactive) Assignee: Benety Goh
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File mongod-9005.log     Text File mongod-9006.log    
Issue Links:
Depends
Related
is related to SERVER-26179 Do not join the TaskRunner within a r... Closed
is related to SERVER-13951 uncommited UnitOfWork needs to rollback Closed
is related to SERVER-25725 Running {setFeatureCompatibilityVersi... Closed
is related to SERVER-11178 Create IndexCatalog and remove Catalo... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

Start two mongods:

/tmp/mms-automation/test/versions/mongodb-osx-x86_64-3.3.14/bin/mongod --dbpath=db1 --replSet=rs0 --port=9005
/tmp/mms-automation/test/versions/mongodb-osx-x86_64-3.3.14/bin/mongod --dbpath=db2 --replSet=rs0 --port=9006

Initialize the replica set as follows:

> rs.initiate({
... "_id" : "rs0",
... "version" : 1,
... "protocolVersion" : NumberLong(1),
... "members" : [
... {
... "_id" : 1,
... "host" : "neurofunk.local:9005"
... },
... {
... "_id" : 2,
... "host" : "neurofunk.local:9006",
... "priority" : 0,
... "buildIndexes" : false
... }
... ]
... })
{ "ok" : 1 }
rs0:SECONDARY> 

Watch the second node get stuck in STARTUP2:

rs0:SECONDARY> rs.status()
{
	"set" : "rs0",
	"date" : ISODate("2016-09-26T20:07:30.512Z"),
	"myState" : 1,
	"term" : NumberLong(1),
	"heartbeatIntervalMillis" : NumberLong(2000),
	"optimes" : {
		"lastCommittedOpTime" : {
			"ts" : Timestamp(0, 0),
			"t" : NumberLong(-1)
		},
		"appliedOpTime" : {
			"ts" : Timestamp(1474920450, 1),
			"t" : NumberLong(1)
		},
		"durableOpTime" : {
			"ts" : Timestamp(1474920450, 1),
			"t" : NumberLong(1)
		}
	},
	"members" : [
		{
			"_id" : 1,
			"name" : "neurofunk.local:9005",
			"health" : 1,
			"state" : 1,
			"stateStr" : "PRIMARY",
			"uptime" : 84,
			"optime" : {
				"ts" : Timestamp(1474920450, 1),
				"t" : NumberLong(1)
			},
			"optimeDate" : ISODate("2016-09-26T20:07:30Z"),
			"infoMessage" : "could not find member to sync from",
			"electionTime" : Timestamp(1474920389, 1),
			"electionDate" : ISODate("2016-09-26T20:06:29Z"),
			"configVersion" : 1,
			"self" : true
		},
		{
			"_id" : 2,
			"name" : "neurofunk.local:9006",
			"health" : 1,
			"state" : 5,
			"stateStr" : "STARTUP2",
			"uptime" : 72,
			"optime" : {
				"ts" : Timestamp(0, 0),
				"t" : NumberLong(-1)
			},
			"optimeDurable" : {
				"ts" : Timestamp(0, 0),
				"t" : NumberLong(-1)
			},
			"optimeDate" : ISODate("1970-01-01T00:00:00Z"),
			"optimeDurableDate" : ISODate("1970-01-01T00:00:00Z"),
			"lastHeartbeat" : ISODate("2016-09-26T20:07:29.742Z"),
			"lastHeartbeatRecv" : ISODate("2016-09-26T20:07:29.219Z"),
			"pingMs" : NumberLong(0),
			"syncingTo" : "neurofunk.local:9005",
			"configVersion" : 1
		}
	],
	"ok" : 1
}

Sprint: Repl 2016-10-10
Participants:

 Description   

Using buildIndexes false will fail the new initial sync (using the DataReplicator).

The hang in startup2 has been resolved in SERVER-26179 already, due to the mishandling of the buildIndexes false error.
Old Description
If I initialize a replica set with one member having buildIndexes set to false, that member gets stuck in STARTUP2.

This bug appears in 3.3.14 but did not appear in 3.3.12.



 Comments   
Comment by Githook User [ 27/Sep/16 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-26335 CollectionBulkLoader should not build secondary indexes if buildIndexes=false in replica set configuration
Branch: master
https://github.com/mongodb/mongo/commit/cc3dd86781371f91333bdf144a7781abd140bc9d

Comment by Timothy Olsen (Inactive) [ 27/Sep/16 ]

Logs attached

Comment by Scott Hernandez (Inactive) [ 26/Sep/16 ]

Can you upload logs if you have them, please?

Comment by Ian Whalen (Inactive) [ 26/Sep/16 ]

From an off-JIRA conversation with scotthernandez: this is possibly already resolved via SERVER-26179. To be determined tomorrow.

Generated at Thu Feb 08 04:11:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.