[GitHub] [carbondata] Indhumathi27 commented on a change in pull request #3437: [CARBONDATA-3530] Support Create timeseries MV Datamap with the supported granularity levels.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] Indhumathi27 commented on a change in pull request #3437: [CARBONDATA-3530] Support Create timeseries MV Datamap with the supported granularity levels.

GitBox
Indhumathi27 commented on a change in pull request #3437: [CARBONDATA-3530] Support Create timeseries MV Datamap with the supported granularity levels.
URL: https://github.com/apache/carbondata/pull/3437#discussion_r347130129
 
 

 ##########
 File path: core/src/main/java/org/apache/carbondata/core/datamap/DataMapStoreManager.java
 ##########
 @@ -233,19 +235,21 @@ public void updateDataMapSchema(List<DataMapSchema> dataMapSchemaList,
    * @param dataMapProvider
    * @param dataMapSchema
    */
-  public synchronized void registerDataMapCatalog(DataMapProvider dataMapProvider,
+  public void registerDataMapCatalog(DataMapProvider dataMapProvider,
       DataMapSchema dataMapSchema) throws IOException {
-    initializeDataMapCatalogs(dataMapProvider);
-    String name = dataMapSchema.getProviderName();
-    DataMapCatalog dataMapCatalog = dataMapCatalogs.get(name);
-    if (dataMapCatalog == null) {
-      dataMapCatalog = dataMapProvider.createDataMapCatalog();
-      if (dataMapCatalog != null) {
-        dataMapCatalogs.put(name.toLowerCase(), dataMapCatalog);
+    synchronized (lockObject) {
+      initializeDataMapCatalogs(dataMapProvider);
+      String name = dataMapSchema.getProviderName().toLowerCase();
+      DataMapCatalog dataMapCatalog = dataMapCatalogs.get(name);
+      if (dataMapCatalog == null) {
+        dataMapCatalog = dataMapProvider.createDataMapCatalog();
+        if (dataMapCatalog != null) {
 
 Review comment:
   okay

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services