code: public void triggerPartitionReplicaSync(int partitionId, Collection<ServiceNamespace> namespaces, int replicaIndex) {
          assert replicaIndex >= 0 && replicaIndex < InternalPartition.MAX_REPLICA_COUNT
                  : "Invalid replica index! partitionId=" + partitionId + ", replicaIndex=" + replicaIndex;
  
          PartitionReplica target = checkAndGetPrimaryReplicaOwner(partitionId, replicaIndex);
          if (target == null) {
              return;
          }
  
          if (!partitionService.areMigrationTasksAllowed()) {
              logger.finest("Cannot send sync replica request for partitionId=" + partitionId + ", replicaIndex=" + replicaIndex
                      + ", namespaces=" + namespaces + ". Sync is not allowed.");
              return;
          }
  
          InternalPartitionImpl partition = partitionStateManager.getPartitionImpl(partitionId);
          if (partition.isMigrating()) {
              logger.finest("Cannot send sync replica request for partitionId=" + partitionId + ", replicaIndex=" + replicaIndex
                      + ", namespaces=" + namespaces + ". Partition is already migrating.");
              return;
          }
  
          sendSyncReplicaRequest(partitionId, namespaces, replicaIndex, target);
      }
docs: This method is called on a backup node (replica). Given all conditions are satisfied, this method initiates a replica sync
  operation and registers it to replicaSyncRequest. The operation is scheduled for a future execution if :
  <ul>
  <li>the {@code delayMillis} is greater than 0</li>
  <li>if a migration is not allowed (during repartitioning or a node joining the cluster)</li>
  <li>the partition is currently migrating</li>
  <li>another sync request has already been sent</li>
  <li>the maximum number of parallel synchronizations has already been reached</li>
  </ul>
  
  @param partitionId  the partition which is being synchronized
  @param namespaces namespaces of partition replica fragments
  @param replicaIndex the index of the replica which is being synchronized
  @throws IllegalArgumentException if the replica index is not between 0 and {@link InternalPartition#MAX_REPLICA_COUNT}