w41ter commented on code in PR #33817:
URL: https://github.com/apache/doris/pull/33817#discussion_r1574240196


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java:
##########
@@ -1601,6 +1605,23 @@ private void transferToMaster() {
         }
     }
 
+    /*
+     * Advance the id generator, ensuring it doesn't roll back.
+     *
+     * If we need to support time travel, the next id cannot be rolled back to 
avoid
+     * errors in the corresponding relationship of the metadata recorded in 
BE/MS.
+     */
+    void advanceNextId() {
+        long currentId = idGenerator.getBatchEndId();
+        long currentNanos = System.nanoTime();
+        long nextId = currentId + 1;
+        if (nextId < currentNanos) {
+            nextId = currentNanos;
+        }
+        idGenerator.setId(nextId);

Review Comment:
   These id Generators are related to queries, not persistent meta. 



-- 
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: commits-unsubscr...@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to