Re: [PR] IoTConsensusV2: Support Table Model Replicate [iotdb]

2024-11-22 Thread via GitHub


OneSizeFitsQuorum merged PR #14169:
URL: https://github.com/apache/iotdb/pull/14169


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IoTConsensusV2: Support Table Model Replicate [iotdb]

2024-11-22 Thread via GitHub


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 deleteNode2ResourcesMap =
+  private final Map 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IoTConsensusV2: Support Table Model Replicate [iotdb]

2024-11-22 Thread via GitHub


Pengzna commented on PR #14169:
URL: https://github.com/apache/iotdb/pull/14169#issuecomment-2493447046

   > SOME UTs FAILED, PLEASE CHECK
   
   fixed


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IoTConsensusV2: Support Table Model Replicate [iotdb]

2024-11-22 Thread via GitHub


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


##
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/StatementAnalyzer.java:
##
@@ -492,7 +492,7 @@ protected Scope visitUse(Use node, Optional scope) {
 
 @Override
 protected Scope visitInsert(Insert insert, Optional scope) {
-  throw new SemanticException("Insert statement is not supported yet.");
+  throw new SemanticException("in");

Review Comment:
   my mistake.fixed



-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IoTConsensusV2: Support Table Model Replicate [iotdb]

2024-11-21 Thread via GitHub


SteveYurongSu commented on PR #14169:
URL: https://github.com/apache/iotdb/pull/14169#issuecomment-2493026042

   SOME UTs FAILED, PLEASE CHECK


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IoTConsensusV2: Support Table Model Replicate [iotdb]

2024-11-21 Thread via GitHub


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


##
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/StatementAnalyzer.java:
##
@@ -492,7 +492,7 @@ protected Scope visitUse(Use node, Optional scope) {
 
 @Override
 protected Scope visitInsert(Insert insert, Optional scope) {
-  throw new SemanticException("Insert statement is not supported yet.");
+  throw new SemanticException("in");

Review Comment:
   WHAT IS THIS FOR? :)



-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org