move creation of GTIDSet appliedGTIDs to its own function