Old audit data (pre-Jira 8.8) is not deleted

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

After upgrading to Jira 8.8 or higher, there is data left on the old audit tables, that are never cleaned up.

Environment

8.8.0 or higher

Diagnosis

When upgrading to Jira 8.8+, there is a new advanced auditing feature that takes over. The old audit data is migrated from the old audit tables (audit_changed_value, audit_item and audit_log) to the new one (AO_C77861_AUDIT_ENTITY).

From this moment, the new table is used and the old ones are ignored. If any data was left behind, it won't be removed automatically.

To check if there were entries left in the old tables, simply run:

1 SELECT count(*) FROM audit_log;

Cause 1

Something went wrong during the upgrade and the audit data either wasn't migrated or was only partially migrated.

The logs should contain errors that occurred during the upgrade.

One possible failure cause is a hard limit of 10.000.000 entries for the migration.

Solution 1

Since the old data will be ignored, it can be safely deleted. One way to do it is truncating the old tables:

1 2 3 TRUNCATE TABLE audit_changed_value; TRUNCATE TABLE audit_item; TRUNCATE TABLE audit_log;

Cause 2

The com.atlassian.audit.atlassian-audit-plugin plugin is not enabled. In this case, the old Audit method is running instead of the new one.

Solution 2

Try to enable the plugin.

If it's failing, check the logs for errors, or open a ticket in the Atlassian Support and attach a Support Zip.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.