Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-67960

Promotion of new 4.2 config server primary stuck creating index on chunks.ns_1_min_1

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • ALL

      Summary
      I have a sharded cluster running MongoDB community 4.0.28 and I am trying to upgrade the config servers to 4.2.20. 

      The config server replica set has 3 nodes running 4.0.28, and I have added 3 new nodes running 4.2.20 for a total of six servers. I have set priority to 1 in just 2 nodes (one 4.0 and one 4.2) to be able to control the promotion process (the rest of the nodes all have prio:0). 

      When trying to promote the 4.2 server via rs.stepDown(), the process doesn't complete and clients start complaining that they are unable to reach primary.

      Looking at db.currentOp() on the 4.2 host that is trying to become primary I see the following operation which seems to be blocking the promotion process:

      {
      			"type" : "op",
      			"host" : "xxxxx:27019",
      			"desc" : "rsSync-0",
      			"active" : true,
      			"currentOpTime" : "2022-07-11T17:51:11.927+0000",
      			"effectiveUsers" : [
      				{
      					"user" : "__system",
      					"db" : "local"
      				}
      			],
      			"opid" : 19266327,
      			"secs_running" : NumberLong(271),
      			"microsecs_running" : NumberLong(271661567),
      			"op" : "command",
      			"ns" : "config.$cmd",
      			"command" : {
      				"createIndexes" : "chunks",
      				"indexes" : [
      					{
      						"name" : "ns_1_min_1",
      						"key" : {
      							"ns" : 1,
      							"min" : 1
      						},
      						"unique" : true
      					}
      				],
      				"$db" : "config"
      			},
      			"numYields" : 0,
      			"waitingForLatch" : {
      				"timestamp" : ISODate("2022-07-11T17:46:40.366Z"),
      				"captureName" : "ReplicationCoordinatorImpl::_mutex"
      			},
      			"locks" : {
      				"ReplicationStateTransition" : "W"
      			},
      			"waitingForLock" : false,
      			"lockStats" : {
      				"ParallelBatchWriterMode" : {
      					"acquireCount" : {
      						"r" : NumberLong(2)
      					}
      				},
      				"ReplicationStateTransition" : {
      					"acquireCount" : {
      						"w" : NumberLong(2)
      					}
      				},
      				"Global" : {
      					"acquireCount" : {
      						"w" : NumberLong(2)
      					}
      				},
      				"Database" : {
      					"acquireCount" : {
      						"w" : NumberLong(2)
      					}
      				},
      				"Collection" : {
      					"acquireCount" : {
      						"w" : NumberLong(1)
      					}
      				},
      				"Mutex" : {
      					"acquireCount" : {
      						"r" : NumberLong(1)
      					}
      				}
      			},
      			"waitingForFlowControl" : false,
      			"flowControlStats" : {
      
      			}
      		},
      

      The config.chunks collection only has 9 chunks so the index creation should be very fast.
      Any help would be appreciated

            Assignee:
            chris.kelly@mongodb.com Chris Kelly
            Reporter:
            igroene@gmail.com Iván Groenewold
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: