Skip to content

Commit 33e7407

Browse files
committed
fix
1 parent 6e98cbd commit 33e7407

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tsfile/PipeTsFileInsertionEvent.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,10 @@ else if (Objects.nonNull(treeSchemaMap)) {
512512
if (Objects.nonNull(devices)) {
513513
final List<MeasurementPath> measurementList = new ArrayList<>();
514514
for (final IDeviceID device : devices) {
515-
measurementList.add(new MeasurementPath(device, IoTDBConstant.ONE_LEVEL_PATH_WILDCARD));
515+
if (treePattern.mayOverlapWithDevice(device)) {
516+
measurementList.add(
517+
new MeasurementPath(device, IoTDBConstant.ONE_LEVEL_PATH_WILDCARD));
518+
}
516519
}
517520
final TSStatus status =
518521
AuthorityChecker.getAccessControl()
@@ -521,11 +524,9 @@ else if (Objects.nonNull(treeSchemaMap)) {
521524
measurementList,
522525
PrivilegeType.READ_DATA);
523526
if (TSStatusCode.SUCCESS_STATUS.getStatusCode() != status.getCode()) {
524-
if (skipIfNoPrivileges) {
525-
shouldParse4Privilege = true;
526-
} else {
527-
throw new AccessDeniedException(status.getMessage());
528-
}
527+
// Note that this is only coarse filter, thus the exception cannot be thrown here.
528+
// The actual process is in the event parser
529+
shouldParse4Privilege = true;
529530
}
530531
} else {
531532
shouldParse4Privilege = true;

0 commit comments

Comments
 (0)