mychaow commented on a change in pull request #1474:
URL: https://github.com/apache/incubator-iotdb/pull/1474#discussion_r454174701
##########
File path:
server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
##########
@@ -785,8 +785,12 @@ private void
tryToUpdateBatchInsertLastCache(InsertTabletPlan plan, Long latestF
continue;
}
// Update cached last value with high priority
- ((MeasurementMNode) node.getChild(measurementList[i]))
- .updateCachedLast(plan.composeLastTimeValuePair(i), true,
latestFlushedTime);
+ MeasurementMNode tmpMeasurementNode = null;
+ if (node != null) {
+ tmpMeasurementNode = (MeasurementMNode)
node.getChild(measurementList[i]);
+ }
+ IoTDB.metaManager.updateLastCache(node.getFullPath() +
IoTDBConstant.PATH_SEPARATOR + measurementList[i],
Review comment:
How about the following code?
`
if (tmpMeasurementNode != null) {
IoTDB.metaManager.updateLastCache(node.getFullPath(),
plan.composeLastTimeValuePair(i), true, latestFlushedTime,
tmpMeasurementNode);
} else {
IoTDB.metaManager.updateLastCache(node.getFullPath() +
IoTDBConstant.PATH_SEPARATOR + measurementList[i],
plan.composeLastTimeValuePair(i), true, latestFlushedTime,
tmpMeasurementNode);
}
`
----------------------------------------------------------------
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:
[email protected]