HxpSerein commented on code in PR #13217:
URL: https://github.com/apache/iotdb/pull/13217#discussion_r1721306382
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/executor/RegionWriteExecutor.java:
##########
@@ -242,24 +242,27 @@ public RegionExecutionResult visitPipeEnrichedInsertNode(
private RegionExecutionResult executeDataInsert(
InsertNode insertNode, WritePlanNodeExecutionContext context) {
RegionExecutionResult response = new RegionExecutionResult();
- context.getRegionWriteValidationRWLock().readLock().lock();
+
try {
+ context.getRegionWriteValidationRWLock().readLock().lock();
+
TSStatus status = fireTriggerAndInsert(context.getRegionId(),
insertNode);
response.setAccepted(TSStatusCode.SUCCESS_STATUS.getStatusCode() ==
status.getCode());
response.setMessage(status.message);
if (!response.isAccepted()) {
response.setStatus(status);
}
- return response;
- } catch (ConsensusException e) {
+ } catch (NullPointerException | ConsensusException e) {
Review Comment:
I think it is ok. It will log a warning and retry for other possible NPE.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]