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

Bulk delete does not delete the indexes properly

    XMLWordPrintableJSON

Details

    • Patch, Important

    Description

      Currently the Bulk Delete, first clears the cache and then does physical deletion from Janus of the required types. At the end of this operation it cycles through the attributes of the deleted types and for those attributes for which it is possible to have indexes, built-ins, enums and structs, marks the indexes as deleted. Since for each attribute the routine goes back to the type of attribute using the typeRegistry, that is the cache, if this attribute is a custom type the attribute was deleted before and the bulk delete partially fails.

      In particular, for each attribute in which this error does not occur, for example because built-in type, a label delete is added to the property key with the number of occurrences with which this property key is present in the store. Something like property_key_deleted_0. In fact, if you try to reload the same types and re-delete,  the property keys are now marked as property_key_deleted_1.

      If, however, for the aforementioned reason the search for the type in the cache fails the property key is not marked and remains fully active, which, from what I can understand at this level of my knowledge, generates at least some MEMORY LEAKs.

      If I reload the types with the same entities and attributes it seems to be all right, but if I change some attributes, in my opinion, the result is unpredictable.

      This path tested on version 2.0 and SNAPSHOT 3.0 would resolve this issue.
      In attachment there is a small example that shows this behavior with and without this patch

      Attachments

        1. application-without-patch.log
          11 kB
          Diego Marino Monetti
        2. application-with-patch.log
          2 kB
          Diego Marino Monetti
        3. sample_type.json
          1 kB
          Diego Marino Monetti
        4. bulkDeleteType
          0.2 kB
          Diego Marino Monetti
        5. bulkCreateType
          0.2 kB
          Diego Marino Monetti
        6. ATLAS-3227.patch
          29 kB
          Diego Marino Monetti
        7. ATLAS-3227-2.patch
          6 kB
          Madhan Neethiraj
        8. ATLAS-3227-branch-0.8.patch
          7 kB
          Madhan Neethiraj

        Issue Links

          Activity

            People

              madhan Madhan Neethiraj
              Zep Diego Marino Monetti
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m