Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-17458

Smart Groups based on custom data that is then disabled return all contacts

    Details

    • Type: Bug
    • Status: Won't Do
    • Priority: Major
    • Resolution: Won't Do
    • Affects Version/s: 4.6.9
    • Fix Version/s: Unscheduled
    • Component/s: Core CiviCRM
    • Labels:
      None
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding

      Description

      So at the moment when a smart group is generated using a piece of custom data. If that custom data is then disabled later on. The smart group remains enabled, and CiviCRM ignores the previous where on the smart group that related to custom data. If that custom data was the only where then civicrm will return all contacts in the database.

      Of course if you have an acled user they will only see the contacts they can see but what is much much more of an issues is that unless the group is disabled, Civi will cache the whole db in the civicrm_group_contact_cache table in this situation. which if you have a sizable db > 100k and you have say 12 of these smart groups where the custom data is the only thing that is being the where, your cache table has already blown out now by 1.2Mill records.

      On our system we have about 250K of contacts and have had at least 20 or so of these situations and that has put a serious dent in our performance because then when its been doing its DELETE FROM civicrm_group_contact_cache it takes ages and then gets killed by our mysql db query killer so never actually removing rows from the contact cache table

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                seamuslee Seamus Lee
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: