protected synchronized void setLastEvent(final Event event) {
    lastEvent = event;
  }
Should be synchronized with {@link PipeSubtask#decreaseReferenceCountAndReleaseLastEvent}
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/agent/task/subtask/PipeSubtask.java