ajantha-bhat 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_r346151535
##########
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();
+ DataMapCatalog dataMapCatalog = dataMapCatalogs.get(name);
Review comment:
dataMapCatalogs.get(name) --> here name should be converted to toLowerCase() before lookup, because insert happened with toLowerCase()
----------------------------------------------------------------
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