You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@iotdb.apache.org by "Xiangdong Huang (Jira)" <ji...@apache.org> on 2020/12/04 18:44:00 UTC
[jira] [Created] (IOTDB-1040) when calling insertRecords(), a
failed row will broadcast its failed messages to next rows
Xiangdong Huang created IOTDB-1040:
--------------------------------------
Summary: when calling insertRecords(), a failed row will broadcast its failed messages to next rows
Key: IOTDB-1040
URL: https://issues.apache.org/jira/browse/IOTDB-1040
Project: Apache IoTDB
Issue Type: Bug
Components: Server
Reporter: Xiangdong Huang
In TsServiceImpl.java insertRecords() function, the codes are:
{code:java}
InsertRowPlan plan = new InsertRowPlan();
for (int i = 0; i < req.deviceIds.size(); i++) {
try {
plan.setDeviceId(new PartialPath(req.getDeviceIds().get(i)));
plan.setTime(req.getTimestamps().get(i));
plan.setMeasurements(req.getMeasurementsList().get(i).toArray(new String[0]));
plan.setDataTypes(new TSDataType[plan.getMeasurements().length]);
plan.setValues(new Object[plan.getMeasurements().length]);
plan.fillValues(req.valuesList.get(i));
plan.setNeedInferType(false);
TSStatus status = checkAuthority(plan, req.getSessionId());
if (status != null) {
statusList.add(status);
} else {
statusList.add(executeNonQueryPlan(plan));
}
} catch (Exception e) {
logger.error("meet error when insert in batch", e);
statusList.add(RpcUtils.getStatus(TSStatusCode.INTERNAL_SERVER_ERROR));
}
}
{code}
In current implementation, if one row has failedMeasurement, then in the next loop, the failedMesurement will be retained...
Then we may get an error message:
"failed to insert points [_0002_00_24, _0002_00_20, _0002_00_19, _0002_00_17, _0002_00_23, _0002_00_18], "
while there are no such measurements in that row
--
This message was sent by Atlassian Jira
(v8.3.4#803005)