This is an automated email from the ASF dual-hosted git repository.

jt2594838 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new bbd424f0013 Avoid parsing fully matched historical table TsFiles 
(#18123)
bbd424f0013 is described below

commit bbd424f00138819aa5cf70f3757070591681b11a
Author: Caideyipi <[email protected]>
AuthorDate: Tue Jul 7 10:33:42 2026 +0800

    Avoid parsing fully matched historical table TsFiles (#18123)
---
 ...eHistoricalDataRegionTsFileAndDeletionSource.java | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/historical/PipeHistoricalDataRegionTsFileAndDeletionSource.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/historical/PipeHistoricalDataRegionTsFileAndDeletionSource.java
index d2f6df290a0..aea86f85dda 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/historical/PipeHistoricalDataRegionTsFileAndDeletionSource.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/historical/PipeHistoricalDataRegionTsFileAndDeletionSource.java
@@ -1020,7 +1020,10 @@ public class 
PipeHistoricalDataRegionTsFileAndDeletionSource
             event);
       }
 
-      if (sloppyPattern || isDbNameCoveredByPattern) {
+      if (sloppyPattern
+          || isDbNameCoveredByPattern
+          || isTsFileResourceCoveredByTablePattern(
+              resource, filteredTsFileResources2TableNames.get(resource))) {
         event.skipParsingPattern();
       }
       if (sloppyTimeRange || isTsFileResourceCoveredByTimeRange(resource)) {
@@ -1067,6 +1070,21 @@ public class 
PipeHistoricalDataRegionTsFileAndDeletionSource
             .containsTsFile(dataRegionId, tsFileDedupScopeID, 
resource.getTsFilePath());
   }
 
+  private boolean isTsFileResourceCoveredByTablePattern(
+      final TsFileResource resource, final Set<String> tableNames) {
+    return isModelDetected
+        && isTableModel
+        && tablePattern.isTableModelDataAllowedToBeCaptured()
+        && Objects.nonNull(resource)
+        && Objects.nonNull(tableNames)
+        && !tableNames.isEmpty()
+        && tableNames.stream()
+            .allMatch(
+                tableName ->
+                    tablePattern.matchesDatabase(resource.getDatabaseName())
+                        && tablePattern.matchesTable(tableName));
+  }
+
   private Event supplyDeletionEvent(final DeletionResource deletionResource) {
     final PipeDeleteDataNodeEvent event =
         new PipeDeleteDataNodeEvent(

Reply via email to