Skip to content

Commit

Permalink
Refactor ResourceSwitchManager (#28664)
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymanu authored Oct 7, 2023
1 parent ffe2e98 commit c2a5ec1
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ public SwitchingResource create(final ResourceMetaData resourceMetaData, final M
mergedPropsMap.putAll(toBeChangedPropsMap);
Map<String, StorageNode> toBeChangedStorageUnitNodeMap = StorageUnitNodeMapCreator.create(toBeChangedPropsMap);
Map<StorageNode, DataSourcePoolProperties> dataSourcePoolPropsMap = StorageNodeAggregator.aggregateDataSourcePoolProperties(toBeChangedPropsMap);
return new SwitchingResource(createNewDataSources(resourceMetaData, toBeChangedStorageUnitNodeMap, dataSourcePoolPropsMap),
getStaleDataSources(resourceMetaData, mergedPropsMap), getStaleStorageUnitNames(resourceMetaData, toBeChangedStorageUnitNodeMap), mergedPropsMap);
Map<StorageNode, DataSource> newDataSources = createNewDataSources(resourceMetaData, toBeChangedStorageUnitNodeMap, dataSourcePoolPropsMap);
Map<StorageNode, DataSource> staleDataSources = getStaleDataSources(resourceMetaData, mergedPropsMap);
return new SwitchingResource(newDataSources, staleDataSources, getStaleStorageUnitNames(resourceMetaData, toBeChangedStorageUnitNodeMap), mergedPropsMap);
}

/**
Expand Down

0 comments on commit c2a5ec1

Please sign in to comment.