未验证 提交 8424f821 编写于 作者: H Haonan 提交者: GitHub

Accelerate the deletion execution (#10967)

上级 daebc419
......@@ -270,7 +270,17 @@ public class DeleteDataNode extends WritePlanNode implements WALEntryValue {
.map(
o ->
new DeleteDataNode(
getPlanNodeId(), regionToPatternMap.get(o), deleteStartTime, deleteEndTime, o))
getPlanNodeId(),
// Pick the smaller path list to execute the deletion.
// E.g. There is only one path(root.sg.**) in pathList and two paths(root.sg.d1,
// root.sg.d2) in a map entry in regionToPatternMap. Choose the original path is
// better.
this.pathList.size() < regionToPatternMap.get(o).size()
? this.pathList
: regionToPatternMap.get(o),
deleteStartTime,
deleteEndTime,
o))
.collect(Collectors.toList());
}
......
......@@ -1935,6 +1935,9 @@ public class DataRegion implements IDataRegionForQuery {
return true;
}
}
if (databaseName.contentEquals(device.getDevice())) {
return false;
}
Pair<Long, Long> startAndEndTime =
tsFileResource.getPossibleStartTimeAndEndTime(device, deviceMatchInfo);
if (startAndEndTime == null) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册