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

Avoid unnecessary logging of updates

    Details

    • Type: Patch
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.0.7
    • Fix Version/s: Unscheduled
    • Component/s: Core CiviCRM
    • Labels:
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code

      Description

      Dave Schafer and I have noted that there are many update transactions being written into the log tables that are not actually changing the data in the table. I believe this is likely because the code does updates in various places to be on the safe side, perhaps in the library we are using.

      The attached patch ensures that when logging is enabled, update transactions are only written to log tables when there are changes being written to the primary table.

      Potential enhancement we didn't explore: trying to find a way to cancel the update without generating an error in order to avoid the unnecessary write.

        Attachments

          Activity

            People

            • Assignee:
              eileen Eileen McNaughton
              Reporter:
              joemurray Joe Murray
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: