Eli Mesika has uploaded a new change for review.

Change subject: core: audig_log table is not cleaned ...(#856009)
......................................................................

core: audig_log table is not cleaned ...(#856009)

core audig_log table is not cleaned properly, causing rhevm database to grow 
excessively(#856009)

https://bugzilla.redhat.com/856009

Problem was that the DeleteAuditLogOlderThenDate removed only records
with processed=true.
this flag is used by rhev-notification tool to mark which events were
handled (by sending events to subscribers) , so , the default of this
flag is false and after rhev-notification tool handles it , it is set to
true

Sine the DeleteAuditLogOlderThenDate removes old data (more than 30 days
by default) there is no need to relate to this flag and it should be
removed from the SP condition.

Change-Id: Id1e5d06751d672aa1f40f5a395234f71597289f4
Signed-off-by: Eli Mesika <emes...@redhat.com>
---
M backend/manager/dbscripts/audit_log_sp.sql
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/16/8016/1

diff --git a/backend/manager/dbscripts/audit_log_sp.sql 
b/backend/manager/dbscripts/audit_log_sp.sql
index 52a0a39..0bdb7e5 100644
--- a/backend/manager/dbscripts/audit_log_sp.sql
+++ b/backend/manager/dbscripts/audit_log_sp.sql
@@ -216,7 +216,7 @@
       GET DIAGNOSTICS SWV_RowCount = ROW_COUNT;
       if (SWV_RowCount > 0) then
          DELETE FROM audit_log
-         WHERE audit_log_id <= v_id and processed = TRUE and
+         WHERE audit_log_id <= v_id and
          audit_log_id not in(select audit_log_id from event_notification_hist);
       end if;
 END; $procedure$


--
To view, visit http://gerrit.ovirt.org/8016
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id1e5d06751d672aa1f40f5a395234f71597289f4
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Eli Mesika <emes...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to