jt2594838 commented on code in PR #14169:
URL: https://github.com/apache/iotdb/pull/14169#discussion_r1853221333


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/consensus/deletion/DeletionResourceManager.java:
##########
@@ -61,16 +64,29 @@ public class DeletionResourceManager implements 
AutoCloseable {
       String.format(
           "^_(?<%s>\\d+)-(?<%s>\\d+)\\%s$",
           REBOOT_TIME, MEM_TABLE_FLUSH_ORDER, DELETION_FILE_SUFFIX);
+  private static final String TABLE_NAME = "table";
   private final String dataRegionId;
   private final DeletionBuffer deletionBuffer;
   private final File storageDir;
-  private final Map<DeleteDataNode, DeletionResource> deleteNode2ResourcesMap =
+  private final Map<AbstractDeleteDataNode, DeletionResource> 
deleteNode2ResourcesMap =
       new ConcurrentHashMap<>();
+  // 1 data region -> 1 kind of database(either a table one or a tree one) -> 
Determined
+  // deleteNodes/DALs type(either table or tree)
   private final Lock recoverLock = new ReentrantLock();
   private final Condition recoveryReadyCondition = recoverLock.newCondition();
   private volatile boolean hasCompletedRecovery = false;
+  private boolean isRelational;
 
   private DeletionResourceManager(String dataRegionId) throws IOException {
+    // Tree model by default
+    this.isRelational = false;
+    Optional.ofNullable(
+            StorageEngine.getInstance()
+                .getDataRegion(new 
DataRegionId(Integer.parseInt(dataRegionId))))
+        .ifPresent(
+            dataRegion -> {
+              this.isRelational = 
dataRegion.getDatabaseName().toLowerCase().contains(TABLE_NAME);
+            });

Review Comment:
   Table model database does not necessarily contain "table". Need a valid 
method to distinguish.



-- 
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]

Reply via email to