Skip to content

Commit

Permalink
Move MetaDataPersistService from MetaDataContexts to PersistServiceFa…
Browse files Browse the repository at this point in the history
…cade
  • Loading branch information
menghaoranss committed May 24, 2024
1 parent a889f5a commit 269a406
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,9 @@ private static void persistDatabaseConfigurations(final MetaDataContexts metadat
}

private static void persistMetaData(final MetaDataContexts metaDataContexts, final MetaDataPersistService persistService) {
metaDataContexts.getMetaData().getDatabases().values().forEach(each -> each.getSchemas()
.forEach((schemaName, schema) -> persistService.getDatabaseMetaDataService().persistByAlterConfiguration(each.getName(), schemaName, schema)));
metaDataContexts.getStatistics().getDatabaseData().forEach((databaseName, databaseData) -> databaseData.getSchemaData().forEach((schemaName, schemaData) ->
persistService.getShardingSphereDataPersistService().persist(databaseName, schemaName, schemaData, metaDataContexts.getMetaData().getDatabases())));
metaDataContexts.getMetaData().getDatabases().values().forEach(each -> each.getSchemas().forEach((schemaName, schema) -> persistService.getDatabaseMetaDataService()
.persistByAlterConfiguration(each.getName(), schemaName, schema)));
metaDataContexts.getStatistics().getDatabaseData().forEach((databaseName, databaseData) -> databaseData.getSchemaData().forEach((schemaName, schemaData) -> persistService
.getShardingSphereDataPersistService().persist(databaseName, schemaName, schemaData, metaDataContexts.getMetaData().getDatabases())));
}
}

0 comments on commit 269a406

Please sign in to comment.