Skip to content

Commit 09546ee

Browse files
committed
Review fix
1 parent cfbcfed commit 09546ee

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

service/common/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogHandler.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
import org.apache.iceberg.catalog.ViewCatalog;
5252
import org.apache.iceberg.exceptions.AlreadyExistsException;
5353
import org.apache.iceberg.exceptions.BadRequestException;
54+
import org.apache.iceberg.exceptions.CommitFailedException;
5455
import org.apache.iceberg.exceptions.ForbiddenException;
5556
import org.apache.iceberg.exceptions.NoSuchTableException;
5657
import org.apache.iceberg.hadoop.HadoopCatalog;
@@ -83,7 +84,6 @@
8384
import org.apache.polaris.core.entity.CatalogEntity;
8485
import org.apache.polaris.core.entity.PolarisEntitySubType;
8586
import org.apache.polaris.core.entity.table.IcebergTableLikeEntity;
86-
import org.apache.polaris.core.exceptions.CommitConflictException;
8787
import org.apache.polaris.core.persistence.PolarisEntityManager;
8888
import org.apache.polaris.core.persistence.PolarisMetaStoreManager;
8989
import org.apache.polaris.core.persistence.PolarisResolvedPathWrapper;
@@ -996,8 +996,8 @@ public void commitTransaction(CommitTransactionRequest commitTransactionRequest)
996996
metaStoreManager.updateEntitiesPropertiesIfNotChanged(
997997
callContext.getPolarisCallContext(), pendingUpdates);
998998
if (!result.isSuccess()) {
999-
// TODO: Retries and server-side cleanup on failure
1000-
throw new CommitConflictException(
999+
// TODO: Retries and server-side cleanup on failure, review possible exceptions
1000+
throw new CommitFailedException(
10011001
"Transaction commit failed with status: %s, extraInfo: %s",
10021002
result.getReturnStatus(), result.getExtraInformation());
10031003
}

spec/generated/bundled-polaris-catalog-service.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ paths:
635635
TableToUpdateDoesNotExist:
636636
$ref: '#/components/examples/NoSuchTableError'
637637
'409':
638-
description: Conflict - CommitConflictException, one or more requirements failed. The client may retry.
638+
description: Conflict - Transaction commit failed due to concurrent modifications. The client may retry.
639639
content:
640640
application/json:
641641
schema:
@@ -930,7 +930,7 @@ paths:
930930
TableToUpdateDoesNotExist:
931931
$ref: '#/components/examples/NoSuchTableError'
932932
'409':
933-
description: Conflict - CommitConflictException, one or more requirements failed. The client may retry.
933+
description: Conflict - Transaction commit failed due to concurrent modifications. The client may retry.
934934
content:
935935
application/json:
936936
schema:
@@ -1140,7 +1140,7 @@ paths:
11401140
ViewToUpdateDoesNotExist:
11411141
$ref: '#/components/examples/NoSuchViewError'
11421142
'409':
1143-
description: Conflict - CommitConflictException, one or more requirements failed. The client may retry.
1143+
description: Conflict - Transaction commit failed due to concurrent modifications. The client may retry.
11441144
content:
11451145
application/json:
11461146
schema:

0 commit comments

Comments
 (0)