[GitHub] [carbondata] ravipesala commented on a change in pull request #3322: [WIP]Fixed NPE in Concurrent query

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

[GitHub] [carbondata] ravipesala commented on a change in pull request #3322: [WIP]Fixed NPE in Concurrent query

GitBox
ravipesala commented on a change in pull request #3322: [WIP]Fixed NPE in Concurrent query
URL: https://github.com/apache/carbondata/pull/3322#discussion_r302135176
 
 

 ##########
 File path: core/src/main/java/org/apache/carbondata/core/datastore/block/SegmentPropertiesAndSchemaHolder.java
 ##########
 @@ -204,6 +204,9 @@ public void invalidate(AbsoluteTableIdentifier absoluteTableIdentifier) {
           .getTableUniqueName()
           .equals(absoluteTableIdentifier.getCarbonTableIdentifier().getTableUniqueName())) {
         SegmentIdAndSegmentPropertiesIndexWrapper value = entry.getValue();
+        synchronized (deleteIndexToDeleteTimestampMapping) {
+          deleteIndexToDeleteTimestampMapping.remove(value.segmentPropertiesIndex);
+        }
         // remove from the reverse mapping map
         indexToSegmentPropertiesWrapperMapping.remove(value.getSegmentPropertiesIndex());
         segmentPropertiesWrappersToBeRemoved.add(segmentPropertiesWrapper);
 
 Review comment:
   Isn't requiredto move this also to synchronize?

----------------------------------------------------------------
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