saksenasonali opened a new pull request, #662:
URL: https://github.com/apache/atlas/pull/662

   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.
   
   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)
   
   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


-- 
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]

Reply via email to