Child pages
  • [system log] Improve "Delete All" button functionality for System Log [5.2.1-RC1]
Skip to end of metadata
Go to start of metadata

We have a great feature called System Log (developed in  INP-1245 - Getting issue details... STATUS ) that is capable of Logging issues on multiple levels.

Currently Admin Interface for "System Log" has Delete All button that tries deleting all records via usual Temp Handler "object" model and obviously fails when there is a lots of records in that table.

Solution

  1. add "IsDeleted" column to the "SystemLog" table
  2. via simple SQL set "IsDeleted=1" to all records that needs to be deleted instead of deleting them immediately from DB
  3. don't show "IsDeleted=1" records anywhere
  4. from CRON delete records marked with "IsDeleted=1" using "TempHandler" by 100 at a time to conserve memory

Related Tasks

INP-1348 - Getting issue details... STATUS

2 Comments

  1. Yes, this is very important fix - honestly I am not sure why we haven't done so from day one...

  2. It's an old discussion. I've just re-formatted it a bit today.

    Another approach (I think I've discussed it somewhere) is:

    1. add IsDeleted column
    2. via simple SQL just set IsDeleted=1 to all records that needs to be deleted
    3. don't delete anything from DB
    4. don't show IsDeleted=1 records anywhere
    5. from CRON delete records marked with IsDeleted=1 using TempHandler by 100 at a time to conserve memory

    We can employ system-wide approach like above to on all grids by the way.