xy720 commented on code in PR #33462:
URL: https://github.com/apache/doris/pull/33462#discussion_r1559606897
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java:
##########
@@ -1812,14 +1813,23 @@ public void dropPartition(Database db, OlapTable
olapTable, DropPartitionClause
}
}
}
- olapTable.dropPartition(db.getId(), partitionName,
clause.isForceDrop());
+ partition = olapTable.dropPartition(db.getId(), partitionName,
clause.isForceDrop());
if (!clause.isForceDrop() && partition != null) {
recycleTime =
Env.getCurrentRecycleBin().getRecycleTimeById(partition.getId());
}
}
- long version = olapTable.getNextVersion();
- long versionTime = System.currentTimeMillis();
- olapTable.updateVisibleVersionAndTime(version, versionTime);
+
+ long version = olapTable.getVisibleVersion();
Review Comment:
Users must obtain write lock of OlapTable before calling the dropPartition
method.
--
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]