morrySnow commented on code in PR #63175:
URL: https://github.com/apache/doris/pull/63175#discussion_r3225710816
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java:
##########
@@ -2042,15 +2046,18 @@ public void replayDropPartition(DropPartitionInfo info)
throws MetaNotFoundExcep
OlapTable olapTable = (OlapTable)
db.getTableOrMetaException(info.getTableId(), TableType.OLAP);
olapTable.writeLock();
try {
+ Partition partition = null;
if (info.isTempPartition()) {
olapTable.dropTempPartition(info.getPartitionName(), true);
} else {
- Partition partition = olapTable.dropPartition(info.getDbId(),
info.getPartitionName(),
- info.isForceDrop());
+ partition = olapTable.dropPartition(info.getDbId(),
info.getPartitionName(), info.isForceDrop());
if (!info.isForceDrop() && partition != null &&
info.getRecycleTime() != 0) {
Env.getCurrentRecycleBin().setRecycleTimeByIdForReplay(partition.getId(),
info.getRecycleTime());
}
}
+ if (partition != null && !info.isTempPartition()) {
Review Comment:
what will happen if we query on temp partition?
--
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]