This is an automated email from the ASF dual-hosted git repository.
jmclean pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/main by this push:
new f4aa8bddcf [#8349] Correct entity type in ModelMetaService.java error
message (#8352)
f4aa8bddcf is described below
commit f4aa8bddcf37856df76e57e435453fc3cf0d1a9a
Author: Akshat kumar gupta
<[email protected]>
AuthorDate: Sat Aug 30 04:21:07 2025 +0530
[#8349] Correct entity type in ModelMetaService.java error message (#8352)
### What changes were proposed in this pull request?
Replaced `Entity.EntityType.CATALOG` with `Entity.EntityType.MODEL` in
`core/src/main/java/org/apache/gravitino/storage/relational/service/ModelMetaService.java`.
### Why are the changes needed?
This fixes the wrong entity type passed into
`ExceptionUtils.checkSQLException`.
The correct entity type for `ModelMetaService` is `MODEL`, not
`CATALOG`.
Fix: #(issue)
### Does this PR introduce _any_ user-facing change?
No user-facing changes. Internal bugfix only.
### How was this patch tested?
Ran the relevant unit test class `TestModelMetaService`.
All tests passed successfully, confirming that changing
`EntityType.CATALOG` to `EntityType.MODEL` does not break functionality.
---
.../apache/gravitino/storage/relational/service/ModelMetaService.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/core/src/main/java/org/apache/gravitino/storage/relational/service/ModelMetaService.java
b/core/src/main/java/org/apache/gravitino/storage/relational/service/ModelMetaService.java
index 58c46d6a01..c150b417bf 100644
---
a/core/src/main/java/org/apache/gravitino/storage/relational/service/ModelMetaService.java
+++
b/core/src/main/java/org/apache/gravitino/storage/relational/service/ModelMetaService.java
@@ -260,7 +260,7 @@ public class ModelMetaService {
POConverters.updateModelPO(oldModelPO, newEntity),
oldModelPO));
} catch (RuntimeException re) {
ExceptionUtils.checkSQLException(
- re, Entity.EntityType.CATALOG,
newEntity.nameIdentifier().toString());
+ re, Entity.EntityType.MODEL, newEntity.nameIdentifier().toString());
throw re;
}