Skip to content

Commit

Permalink
Update fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinchou authored Aug 30, 2024
1 parent 16a6b2a commit b66748c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java
Original file line number Diff line number Diff line change
Expand Up @@ -1681,8 +1681,8 @@ void advanceNextId() {
long currentId = idGenerator.getBatchEndId();
long currentMill = System.currentTimeMillis();
long nextId = currentId + 1;
// Reserve at most 8 billion for use in case of bugs or frequent reboots (21 billion reboots)
if ((1L << 63) - nextId < (1L << 33)) {
// Reserve ~1 trillion for use in case of bugs or frequent reboots (~2 billion reboots)
if ((1L << 63) - nextId < (1L << 40)) {
LOG.warn("nextId is too large: {}, it may be a bug and consider backup and migration", nextId);
} else {
// Keep compatible with previous impl, the previous impl may result in extreme large nextId,
Expand Down

0 comments on commit b66748c

Please sign in to comment.