ShreelekhyaG commented on a change in pull request #4251:
URL: https://github.com/apache/carbondata/pull/4251#discussion_r818597889



##########
File path: core/src/main/java/org/apache/carbondata/core/view/MVManager.java
##########
@@ -181,32 +181,48 @@ public void deleteSchema(String databaseName, String 
viewName) throws IOExceptio
    */
   public MVCatalog<?> getCatalog(
       MVCatalogFactory<?> catalogFactory,
-      boolean reload) throws IOException {
+      List<MVSchema> currSchemas) throws IOException {
     MVCatalog<?> catalog = this.catalog;
-    if (reload || catalog == null) {
-      synchronized (lock) {
-        catalog = this.catalog;
-        if (reload || catalog == null) {
-          catalog = catalogFactory.newCatalog();
-          List<MVSchema> schemas = getSchemas();
-          if (null == catalog) {
-            throw new RuntimeException("Internal Error.");
+    synchronized (lock) {
+      catalog = this.catalog;
+      if (catalog == null) {
+        catalog = catalogFactory.newCatalog();
+      }
+      List<MVSchema> schemas = getSchemas();

Review comment:
       added check for containsAll




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to