Skip to content

Commit

Permalink
Refactor ResourceMetaData
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymanu committed Sep 29, 2023
1 parent 4904750 commit 6cfb07a
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import org.apache.shardingsphere.infra.metadata.database.resource.node.StorageNode;
import org.apache.shardingsphere.infra.metadata.database.resource.node.StorageNodeName;
import org.apache.shardingsphere.infra.metadata.database.resource.node.StorageNodeUtils;
import org.apache.shardingsphere.infra.metadata.database.resource.unit.NewStorageUnitMetaData;
import org.apache.shardingsphere.infra.metadata.database.resource.unit.StorageUnitMetaData;
import org.apache.shardingsphere.infra.metadata.database.resource.unit.StorageUnitNodeMapUtils;

Expand Down Expand Up @@ -68,9 +67,9 @@ public ResourceMetaData(final String databaseName, final Map<StorageNodeName, Da
*/
public Collection<String> getAllInstanceDataSourceNames() {
Collection<String> result = new LinkedList<>();
for (Entry<String, NewStorageUnitMetaData> entry : storageUnitMetaData.getMetaDataMap().entrySet()) {
if (!isExisted(entry.getKey(), result)) {
result.add(entry.getKey());
for (String each : storageUnitMetaData.getMetaDataMap().keySet()) {
if (!isExisted(each, result)) {
result.add(each);
}
}
return result;
Expand Down

0 comments on commit 6cfb07a

Please sign in to comment.