While onConfirmedSet is called synchronously, it schedules ShardRegistry::updateReplicaSetOnConfigServer through a thread pool task executor.
A single node may call onConfirmedSet serially several times at almost the same time - it's possible for the scheduled threads to pause and ordering to not be upheld.