@Override public void rollbackMigration(PartitionMigrationEvent event) { if (DESTINATION == event.getMigrationEndpoint()) { removeRecordStoresHavingLesserBackupCountThan(event.getPartitionId(), event.getCurrentReplicaIndex()); getMetaDataGenerator().removeUuidAndSequence(event.getPartitionId()); } mapServiceContext.reloadOwnedPartitions(); }
@Override public void rollbackMigration(PartitionMigrationEvent event) { if (DESTINATION == event.getMigrationEndpoint()) { removeRecordStoresHavingLesserBackupCountThan(event.getPartitionId(), event.getCurrentReplicaIndex()); getMetaDataGenerator().removeUuidAndSequence(event.getPartitionId()); } mapServiceContext.reloadOwnedPartitions(); }
@Override public void commitMigration(PartitionMigrationEvent event) { if (event.getMigrationEndpoint() == DESTINATION) { populateIndexes(event, TargetIndexes.GLOBAL); } else { depopulateIndexes(event); } if (SOURCE == event.getMigrationEndpoint()) { removeRecordStoresHavingLesserBackupCountThan(event.getPartitionId(), event.getNewReplicaIndex()); } PartitionContainer partitionContainer = mapServiceContext.getPartitionContainer(event.getPartitionId()); for (RecordStore recordStore : partitionContainer.getAllRecordStores()) { // in case the record store has been created without loading during migration trigger again // if loading has been already started this call will do nothing recordStore.startLoading(); } mapServiceContext.reloadOwnedPartitions(); removeOrRegenerateNearCacheUuid(event); }
@Override public void commitMigration(PartitionMigrationEvent event) { if (event.getMigrationEndpoint() == DESTINATION) { populateIndexes(event, TargetIndexes.GLOBAL); } else { depopulateIndexes(event); } if (SOURCE == event.getMigrationEndpoint()) { removeRecordStoresHavingLesserBackupCountThan(event.getPartitionId(), event.getNewReplicaIndex()); } PartitionContainer partitionContainer = mapServiceContext.getPartitionContainer(event.getPartitionId()); for (RecordStore recordStore : partitionContainer.getAllRecordStores()) { // in case the record store has been created without loading during migration trigger again // if loading has been already started this call will do nothing recordStore.startLoading(); } mapServiceContext.reloadOwnedPartitions(); removeOrRegenerateNearCacheUuid(event); }