-
Notifications
You must be signed in to change notification settings - Fork 9
ignore deleting core types. log errors when it happens #5407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: staging
Are you sure you want to change the base?
Conversation
ttr.addTypes(businessMetadataDefs); | ||
commitUpdates = true; | ||
} catch (Throwable abe) { | ||
LOG.warn("reloadBusinessMetadataTypeDefs(): failed to reload BM defs", abe); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Metadata Reload Inconsistencies and Exception Handling
Two inconsistencies appear in the reload*TypeDefs
methods:
reloadBusinessMetadataTypeDefs()
andreloadClassificationMetadataTypeDefs()
are missing theatlas_core
service type check, allowing built-in types to be removed during reload, unlike other type definitions.- All
reload*TypeDefs
methods now catch and logThrowable
, effectively swallowing exceptions and breaking the API contract that declaresthrows AtlasBaseException
.
Additional Locations (1)
ttr.addTypes(enumDefs); | ||
commitUpdates = true; | ||
} catch (Throwable abe) { | ||
LOG.warn("reloadEnumTypeDefs(): failed to reload enum defs", abe); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: API Contract Violation in Exception Handling
The reload*TypeDefs
methods now catch all Throwable
exceptions and log them as warnings without rethrowing. This breaks the API contract, as these methods are declared to throw AtlasBaseException
, masking critical errors and potentially leaving type definitions in a stale state.
Additional Locations (4)
repository/src/main/java/org/apache/atlas/repository/store/graph/AtlasTypeDefGraphStore.java#L172-L174
repository/src/main/java/org/apache/atlas/repository/store/graph/AtlasTypeDefGraphStore.java#L200-L202
repository/src/main/java/org/apache/atlas/repository/store/graph/AtlasTypeDefGraphStore.java#L228-L230
repository/src/main/java/org/apache/atlas/repository/store/graph/AtlasTypeDefGraphStore.java#L276-L278
} | ||
ttr.addTypes(classificationDefs); | ||
commitUpdates = true; | ||
} catch (Throwable abe) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Classification Metadata Reload Fails Core Type Check
The reloadClassificationMetadataTypeDefs()
method is missing the atlas_core
service type check. This allows built-in classification types to be removed during reload operations, which is inconsistent with other reload*TypeDefs
methods that now protect their core types.
Change description
Type of change
Related issues
Helm Config Changes for Running Tests (Staging PR)
Does this PR require Helm config changes for testing?
enpla9up36
. (You can proceed with the PR.) ✅Checklists
Development
Security
Code review