Caideyipi commented on code in PR #16849:
URL: https://github.com/apache/iotdb/pull/16849#discussion_r2583516365
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/PipeInsertNodeTabletInsertionEvent.java:
##########
@@ -351,6 +398,11 @@ public boolean mayEventPathsOverlappedWithPattern() {
try {
final InsertNode insertNode = getInsertNode();
if (Objects.isNull(insertNode)) {
+ if (!isReleased.get()) {
Review Comment:
Same as above
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/PipeInsertNodeTabletInsertionEvent.java:
##########
@@ -443,6 +495,15 @@ private List<TabletInsertionEventParser>
initEventParsers() {
eventParsers = new ArrayList<>();
final InsertNode node = getInsertNode();
+ if (Objects.isNull(node)) {
+ if (!isReleased.get()) {
Review Comment:
Same as above
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/PipeInsertNodeTabletInsertionEvent.java:
##########
@@ -307,6 +349,11 @@ public boolean mayEventTimeOverlappedWithTimeRange() {
try {
final InsertNode insertNode = getInsertNode();
if (Objects.isNull(insertNode)) {
+ if (!isReleased.get()) {
Review Comment:
Same as above
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/PipeInsertNodeTabletInsertionEvent.java:
##########
@@ -263,25 +284,46 @@ public PipeInsertNodeTabletInsertionEvent
shallowCopySelfAndBindPipeTaskMetaForP
@Override
public boolean isGeneratedByPipe() {
- return insertNode.isGeneratedByPipe();
+ final InsertNode node = insertNode;
+ if (Objects.isNull(node)) {
+ if (!isReleased.get()) {
+ LOGGER.warn(
+ "InsertNode is null but event is not released yet. Event: {}",
coreReportMessage());
+ throw new PipeException(
+ "InsertNode is null but event is not released, this should not
happen");
+ }
+ return false;
+ }
+ return node.isGeneratedByPipe();
}
@Override
public void throwIfNoPrivilege() {
if (skipIfNoPrivileges || !isTableModelEvent()) {
return;
}
- if (Objects.nonNull(insertNode.getTargetPath())) {
- checkTableName(
-
DeviceIDFactory.getInstance().getDeviceID(insertNode.getTargetPath()).getTableName());
- } else if (insertNode instanceof InsertRowsNode) {
+ final InsertNode node = insertNode;
+ if (Objects.isNull(node)) {
+ if (!isReleased.get()) {
Review Comment:
Same as above
--
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]