private void updateBlockSnapshotConsistencyGroup(){
  log.info("Migrating BlockSnapshot consistencyGroup to consistencyGroups.");
  DbClient dbClient=getDbClient();
  List<URI> blockSnapshotURIs=dbClient.queryByType(BlockSnapshot.class,false);
  Iterator<BlockSnapshot> blockSnapshots=dbClient.queryIterativeObjects(BlockSnapshot.class,blockSnapshotURIs);
  List<BlockObject> blockObjects=new ArrayList<BlockObject>();
  while (blockSnapshots.hasNext()) {
    blockObjects.add(blockSnapshots.next());
  }
  migrate(blockObjects);
}

private void updateBlockSnapshotConsistencyGroup ( ) { log . info ( "Migrating BlockSnapshot consistencyGroup to consistencyGroups." ) ; DbClient dbClient = getDbClient ( ) ; List < URI > blockSnapshotURIs = dbClient . queryByType ( BlockSnapshot . class , false ) ; Iterator < BlockSnapshot > blockSnapshots = dbClient . queryIterativeObjects ( BlockSnapshot . class , blockSnapshotURIs ) ; List < BlockObject > blockObjects = new ArrayList < BlockObject > ( ) ; while ( blockSnapshots . hasNext ( ) ) { blockObjects . add ( blockSnapshots . next ( ) ) ; } migrate ( blockObjects ) ; }
update the blocksnapshot object to migrate the old consistencygroup field into the new consistencygroup list field .
