Skip to content

Commit

Permalink
Revert "[fix](tablet invert index) fix tablet invert index leaky caus…
Browse files Browse the repository at this point in the history
…ed by auto partition (#33714)"

This reverts commit 7b44e3b.
  • Loading branch information
Doris-Extras committed Apr 21, 2024
1 parent eaf0157 commit 3217cd4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 66 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1451,9 +1451,7 @@ public void addPartition(Database db, String tableName, AddPartitionClause addPa
if (olapTable.checkPartitionNameExist(partitionName)) {
if (singlePartitionDesc.isSetIfNotExists()) {
LOG.info("add partition[{}] which already exists", partitionName);
if (!DebugPointUtil.isEnable("InternalCatalog.addPartition.noCheckExists")) {
return;
}
return;
} else {
ErrorReport.reportDdlException(ErrorCode.ERR_SAME_NAME_PARTITION, partitionName);
}
Expand Down Expand Up @@ -1610,7 +1608,6 @@ public void addPartition(Database db, String tableName, AddPartitionClause addPa
if (!Strings.isNullOrEmpty(dataProperty.getStoragePolicy())) {
storagePolicy = dataProperty.getStoragePolicy();
}
boolean ignoreException = false;
try {
long partitionId = idGeneratorBuffer.getNextId();
List<Long> partitionIds = Lists.newArrayList(partitionId);
Expand All @@ -1634,10 +1631,11 @@ public void addPartition(Database db, String tableName, AddPartitionClause addPa
// check partition name
if (olapTable.checkPartitionNameExist(partitionName)) {
if (singlePartitionDesc.isSetIfNotExists()) {
ignoreException = true;
LOG.info("add partition[{}] which already exists", partitionName);
return;
} else {
ErrorReport.reportDdlException(ErrorCode.ERR_SAME_NAME_PARTITION, partitionName);
}
LOG.info("add partition[{}] which already exists", partitionName);
ErrorReport.reportDdlException(ErrorCode.ERR_SAME_NAME_PARTITION, partitionName);
}

// check if meta changed
Expand Down Expand Up @@ -1682,6 +1680,8 @@ public void addPartition(Database db, String tableName, AddPartitionClause addPa
}
}



if (metaChanged) {
throw new DdlException("Table[" + tableName + "]'s meta has been changed. try again.");
}
Expand Down Expand Up @@ -1728,9 +1728,7 @@ public void addPartition(Database db, String tableName, AddPartitionClause addPa
for (Long tabletId : tabletIdSet) {
Env.getCurrentInvertedIndex().deleteTablet(tabletId);
}
if (!ignoreException) {
throw e;
}
throw e;
}
}

Expand Down

This file was deleted.

0 comments on commit 3217cd4

Please sign in to comment.