jerryshao commented on code in PR #15034:
URL: https://github.com/apache/gravitino/pull/15034#discussion_r4613148996
##########
core/src/main/java/org/apache/gravitino/storage/relational/service/GlossaryTermMetaService.java:
##########
@@ -202,12 +202,14 @@ public boolean delete(NameIdentifier ident) {
try {
return transaction(
ident.namespace(),
+ true,
(mapper, metalakeId) -> {
GlossaryTermPO row = require(mapper, ident, metalakeId);
long deletedAt = Math.max(1, System.currentTimeMillis());
requireUpdated(
mapper.delete(row.getTermId(), row.getCurrentVersion(),
deletedAt), ident);
mapper.deleteSynonyms(row.getTermId(), deletedAt);
+ GlossaryTermRelService.getInstance().removeTerm(metalakeId,
row.getTermId());
return true;
});
} catch (NoSuchEntityException e) {
Review Comment:
This catch also swallows the metalake-missing NoSuchEntityException from
transaction(), so deleting a term in a nonexistent or concurrently dropped
metalake returns false instead of surfacing the missing parent. Consider only
mapping the term-not-found case to false.
--
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]