/
Slow speed of System Log rotation code [5.2.2-B2]

Slow speed of System Log rotation code [5.2.2-B2]

The "System Log" feature of In-Portal is a place, where all the notices/warnings/errors/exceptions are logged. In addition, a developer can put any other logging information in there. To prevent the System Log from growing to extreme sizes, a log rotation feature was added to remove the older records automatically.

The rotation code has several issues:

  • it is removing only 50 records per day (would fail to delete all the necessary records for months, when a large rotation period is configured)
  • record removing is done via the "kTempTablesHandler::DeleteItems" method, which is known to produce memory leaks on large (>1000) record counts

Solution

Rewrite OnDelete, OnDeleteAll, and OnRotate events of the "system-log" unit to use direct DELETE SQLs.

Related Tasks

INP-1841 - Getting issue details... STATUS