Uploaded image for project: 'Atlas'
  1. Atlas
  2. ATLAS-1780

Type deletion blocks ability to redefine same type with different attribute

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.8-incubating
    • 0.8.1, 1.0.0
    • None
    • None

    Description

      This change supports the use-case where the user creates a type and deletes it sometime later, now the redefinition of the type is restricted to use the same data type for the attributes used during the initial creation.

      Solution: Rename the propertyKey corresponding to that attribute using the titan management API by suffing _deleted_xxx where xxx is an increasing integer sequence starting from 0. The reason for increment of xxx is that the type create, delete and re-create can be done multiple times without any conflicting key in Titan.

      Use case: Create a Tag/Trait with atleast one attribute, delete the tag, recreate the exact same tag with a different data type for the attribute. Creation will be a success, try associating the Tag/trait with any entity with the attribute value (new data type) this should fail with a ClassCastException

      Attachments

        Activity

          People

            apoorvnaik Apoorv Naik
            apoorvnaik Apoorv Naik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: