Skip to content

Commit

Permalink
[CARBONDATA-3409] Fix Concurrent dataloading Issue with mv
Browse files Browse the repository at this point in the history
Problem:
While performing concurrent dataloading to MV datamap, if any of the loads was not able to get TableStatusLock, then because newLoadName and segmentMap was empty, it was doing full rebuild.

Solution:
If load was not able to take tablestatuslock, then disable the datamap and return

This closes #3252
  • Loading branch information
Indhumathi27 authored and ravipesala committed Jun 6, 2019
1 parent b0d5a5c commit 9d02092
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -27,6 +27,7 @@
import org.apache.carbondata.core.constants.CarbonCommonConstants;
import org.apache.carbondata.core.datamap.dev.DataMapFactory;
import org.apache.carbondata.core.datamap.status.DataMapSegmentStatusUtil;
import org.apache.carbondata.core.datamap.status.DataMapStatusManager;
import org.apache.carbondata.core.locks.ICarbonLock;
import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
import org.apache.carbondata.core.metadata.schema.table.CarbonTable;
Expand Down Expand Up @@ -208,6 +209,8 @@ public boolean rebuild() throws IOException, NoSuchDataMapException {
"Not able to acquire the lock for Table status updation for table " + dataMapSchema
.getRelationIdentifier().getDatabaseName() + "." + dataMapSchema
.getRelationIdentifier().getTableName());
DataMapStatusManager.disableDataMap(dataMapSchema.getDataMapName());
return false;
}
} finally {
if (carbonLock.unlock()) {
Expand Down

0 comments on commit 9d02092

Please sign in to comment.