imbajin commented on code in PR #2911:
URL: 
https://github.com/apache/incubator-hugegraph/pull/2911#discussion_r2554943286


##########
hugegraph-server/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseStore.java:
##########
@@ -114,6 +114,14 @@ protected List<String> tableNames() {
                           .collect(Collectors.toList());
     }
 
+    protected List<String> truncatedTableNames() {
+        return this.tables.values().stream()
+                          .filter(table -> !(table instanceof HbaseTables.Meta 
||
+                                           table instanceof 
HbaseTables.Counters))
+                          .map(BackendTable::table)

Review Comment:
   ‼️ **Critical: Logic Error - Counters Table Should Be Truncated**
   
   The `Counters` table contains graph-specific data like vertex/edge ID 
sequences. When truncating a graph, this data should be cleared to avoid ID 
conflicts when repopulating the graph.
   
   Only the `Meta` table (which stores backend version metadata) should be 
preserved during truncation.
   
   ```suggestion
   protected List<String> truncatedTableNames() {
       return this.tables.values().stream()
                         .filter(table -> !(table instanceof HbaseTables.Meta))
                         .map(BackendTable::table)
                         .collect(Collectors.toList());
   }
   ```



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to