Uploaded image for project: 'Apache Unomi'
  1. Apache Unomi
  2. UNOMI-549

Strange validation on conditions during segment/scoring save.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • unomi-2.0.0, unomi-1.6.0
    • unomi-3.0.0
    • unomi(-core)
    • None

    Description

      Currently when a segment or a scoring is save, there is a validation process that try to valdiate that the condition of those items are correct.

      For doing so it's building the conditionEvaluator and the conditionESQueryBuilder associated to the item condition and execute them.

      This way of doing things is not really efficient because in some case the Condition could not have the same behavior during the segment save and the real runtime of the Condition.

      This is the case for the PastEventCondition for example.

      During the save it doesnt contains yet the autogenerated rules and the autogenerated property key associated to the counter property store on the profile, because this is done during the segment creation.

      This have a direct impact on the validation, because the validation will then execute the PastEventCondition in the state where it doesnt have the auto generated rule.

      • it will do large queries and aggregates on existing events and profiles for nothing, because validation dont care about the result, just to check that it's not crashing Exceptions
      • it's validating a code that will not be used after during the runtime, because the auto generated rule will be created so the PastEventCondition will behave differently and use a more optimized code.

      So in case of PastEventCondition, the validation is only testing dead code for nothing.

      Proposition:

      • implement an optional validation layer at the conditionEvaluator and the conditionESQueryBuilder level. so then can provide validation function if it's necessary.

      Validation have been introduce here: https://issues.apache.org/jira/browse/UNOMI-419

      Attachments

        Activity

          People

            Unassigned Unassigned
            jkevan Kevan Jahanshahi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: