You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/09/18 02:45:26 UTC

[GitHub] [shardingsphere] zhaojinchao95 commented on a diff in pull request #21037: Refactor view metadata load and persist logic

zhaojinchao95 commented on code in PR #21037:
URL: https://github.com/apache/shardingsphere/pull/21037#discussion_r973651461


##########
shardingsphere-mode/shardingsphere-mode-core/src/main/java/org/apache/shardingsphere/mode/metadata/persist/service/schema/ViewMetaDataPersistService.java:
##########
@@ -42,9 +41,7 @@ public final class ViewMetaDataPersistService implements SchemaMetaDataPersistSe
     
     @Override
     public void compareAndPersist(final String databaseName, final String schemaName, final Map<String, ShardingSphereView> loadedViews) {
-        Map<String, ShardingSphereView> currentViews = load(databaseName, schemaName);
-        persist(databaseName, schemaName, SchemaManager.getToBeAddedViews(loadedViews, currentViews));
-        SchemaManager.getToBeDeletedViews(loadedViews, currentViews).forEach((key, value) -> delete(databaseName, schemaName, key));
+        

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org