saksenasonali opened a new pull request, #661: URL: https://github.com/apache/atlas/pull/661
What changes were proposed in this pull request? Fixes Replication Manager export/import when a classification (tag) attribute type changes between exports (e.g. string → double after the tag is deleted and recreated on the source with the same name). Previously, incremental import failed with INVALID_IMPORT_ATTRIBUTE_TYPE_CHANGED or a JanusGraph schema error because the target kept the old typedef and property key types. Changes: TypeAttributeDifference — When an attribute already exists but its typeName differs, treat the incoming definition as an update (via addAttribute) instead of throwing INVALID_IMPORT_ATTRIBUTE_TYPE_CHANGED. AtlasStructDefStoreV2 — During import (RequestContext.isImportInProgress()), allow persisting typedef attribute data-type changes and serialize the new attribute definition from the import payload. GraphBackedSearchIndexer — During import, if an existing JanusGraph property key’s data type no longer matches the typedef, delete and recreate the property key so classification values can be stored with the new type. AtlasGraphManagement / AtlasJanusGraphManagement — Add propertyKeyHasDataType() to detect property key / data-type mismatches. Related: [CDPD-69317](https://cloudera.atlassian.net/browse/CDPD-69317) — Export/Import API: When tag attributes types get modified between the exports, causes issues in import How was this patch tested? Unit / integration tests mvn -pl repository -Dtest=TypeAttributeDifferenceTest,ImportServiceTest#importHdfs_path1 test mvn -pl graphdb/janus -Dtest=AtlasJanusGraphManagementTest test TypeAttributeDifferenceTest#attributeTypeChanged_ReturnsUpdatedAttribute — Verifies changed attribute types are included in the typedef diff for import. ImportServiceTest#importHdfs_path1 — End-to-end import scenario: pre-existing tag with attrib1=date, import zip with attrib1=string; import succeeds and typedef is updated (previously expected failure). AtlasJanusGraphManagementTest — Covers new propertyKeyHasDataType API. Manual / cluster E2E (Replication Manager flow) Reproduces CDPD-69317 on two clusters (export source → import target): Create table + tag (a = string), associate a="abc", full incremental export (changeMarker=0), import to target Disassociate tag, delete tag, recreate tag (a = double), associate a=3.14, incremental export, import to target Verify target typedef has a: double and classification value 3.14 export EXPORT_URL=http://ccycloud-2.quasar-otxayt.root.comops.site:31000 export IMPORT_URL=http://ccycloud-1.quasar-wsnadz.root.comops.site:31000 export ATLAS_USER=admin export ATLAS_PASS=admin123 ./dev-support/atlas-docker/scripts/e2e-cdpd-69317.sh -- 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]
