未验证 提交 ca26dd68 编写于 作者: P Patrick Mackinlay 提交者: GitHub

chore(cutlass): Log CairoException when writing rows in ILP TCP (#665)

* chore(cutlass): Log CairoException when writing rows in ILP TCP

* chore(cutlass): Fix logging level
上级 6269e2c8
......@@ -423,7 +423,7 @@ class LineTcpMeasurementScheduler implements Closeable {
timestamp = timestampAdapter.getMicros(cache.get(timestampAddress));
timestampAddress = 0;
} catch (NumericException e) {
LOG.info().$("invalid timestamp: ").$(cache.get(timestampAddress)).$();
LOG.error().$("invalid timestamp: ").$(cache.get(timestampAddress)).$();
timestamp = Long.MIN_VALUE;
throw e;
}
......@@ -635,12 +635,23 @@ class LineTcpMeasurementScheduler implements Closeable {
CairoLineProtoParserSupport.writers.getQuick(columnType).write(row, columnIndex, event.getValue(i));
}
row.append();
} catch (NumericException | CairoException | BadCastException ignore) {
} catch (NumericException | BadCastException ex) {
// These exceptions are logged elsewhere
if (null != row) {
row.cancel();
}
return;
} catch (CairoException ex) {
LOG.error()
.$("could not insert measurement [jobName=").$(jobName)
.$(", table=").$(event.getTableName())
.$(", ex=").$(ex.getFlyweightMessage())
.$(", errno=").$(ex.getErrno())
.$(']').$();
if (null != row) {
row.cancel();
}
return;
}
nUncommitted++;
if (nUncommitted > maxUncommittedRows) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册