public function deleteAllMappingsByType($type, $chunk_size = 25) {
    $ids = $this->queryFactory
      ->get('mapping')
      ->condition('type', $type)
      ->execute();

    if (!$ids) {
      return;
    }

    $chunks = array_chunk($ids, $chunk_size);
    foreach ($chunks as $chunk) {
      $entities = $this->storageMapping->loadMultiple($chunk);
      $this->storageMapping->delete($entities);
    }
  }