We are planning to turn off the secondary synchronous replica in our always on availability group for few hours for maintenance . Once we are done with the maintenance then we will need to failover and do maintenance on the original primary node.
Here is my question for example during the maintenance if there were around 5 gigs of log files that were not applied when we took the secondary node off , now when the secondary comes back online can we immediately failover and make the secondary the new primary or we will have to wait for the logs to be applied to the secondary first to make it synchronized and then failover to make it the new primary.