private void controlReplicationThreads() {
    // Get all partitions that aren't currently replicating
    Set<PartitionId> allPartitions = new HashSet<>(allBootstrappingPartitions);
    Set<PartitionId> partitionsToDisable = new HashSet<>(allPartitions);
    partitionsToDisable.removeAll(currentlyReplicatingPriorityPartitions);

    // Disable non-priority partitions
    if (!partitionsToDisable.isEmpty()) {
      logger.info("Disabling replication for {} non-priority partitions", partitionsToDisable.size());
      replicationEngine.controlReplicationForPartitions(partitionsToDisable, Collections.emptyList(), false);
      disabledReplicationPartitions.addAll(partitionsToDisable);
    }


    // Enable high-priority partitions
    logger.info("Enabling replication for {} high-priority partitions", currentlyReplicatingPriorityPartitions.size());
    replicationEngine.controlReplicationForPartitions(currentlyReplicatingPriorityPartitions, Collections.emptyList(), true);
    disabledReplicationPartitions.removeAll(currentlyReplicatingPriorityPartitions);
    replicationPrioritizationMetrics.updateDisabledReplicationPartitions(disabledReplicationPartitions);
  }
Update the replication threads to reflect the current priority set.
ambry-prioritization/src/main/java/com/github/ambry/replica/prioritization/ReplicationPrioritizationManager.java