grouper-users - Re: [grouper-users] old records not removed from grouper_change_log_entry table
Subject: Grouper Users - Open Discussion List
List archive
Re: [grouper-users] old records not removed from grouper_change_log_entry table
Chronological Thread
- From: Ben Beecher <>
- To: "Hyzer, Chris" <>
- Cc: "" <>
- Subject: Re: [grouper-users] old records not removed from grouper_change_log_entry table
- Date: Thu, 8 Dec 2016 10:46:35 -0500
- Ironport-phdr: 9a23:6Qe9LBZwpFRTM7n8Q2zl98L/LSx+4OfEezUN459isYplN5qZoMu4bnLW6fgltlLVR4KTs6sC0LuN9f28Ejddqb+681k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i764jEdAAjwOhRoLerpBIHSk9631+ev8JHPfglEnjSwbLd8IRmsrQjcucYajIViJ60s1hbHv3xEdvhMy2h1P1yThRH85smx/J5n7Stdvu8q+tBDX6vnYak2VKRUAzs6PW874s3rrgTDQhCU5nQASGUWkwFHDBbD4RrnQ5r+qCr6tu562CmHIc37SK0/VDq+46t3ThLjlSEKPCM7/m7KkMx9lKBUoByhqRJxwIDafZ+bO+Zlc6zHYd8XX3BMUtpNWyFDBI63cosBD/AGPeZdt4TwukUBrR2jDgSxGuzg1CNHhn/o0q0gzu8sFhrJ0xI+EN0SsHTbss/1ObwOXuCyyKnI0DDDYOhX2Tjn8oTHbA0uoeyVUL92bMHfylEvGhvYglmOqoHpJTOY2+AXv2WZ8eZsT+yihmo/pw1vvjSiwt0gh4rJi44P1FzI6yt0zJwoKdC8TEN2Z8OvHoFKuCGALYR2R9svQ2F2tyY+zb0LoZm7fDUWyJQ/3R7fbOGIc42S7RLiUOadPSp0iGh5d72jnRq97U+gyunhVsmxy1lKrzBKnsPSuX8Qyhzf8smHSv1j8Ue9wTuDyh7f5+JeLU00kafXMZwszqAqmpcdtUnPBir2l1/3jK+SeEUk4O+o6+H/b7XmvZCQKYB5hxriPaQpnsy/HOE4PRMPX2eB4+izyqDs/VDhTLVQkvI2irXZsIzdJckDqa65GQhV0ps76xmhFTeqyckYnWIZI1JfYxKKlIzpO1DVIPDkFveznU6gkDZtx/DaILLhGJPNIWbfkLv/Z7py9VNTyBdghexYsth0G6MMOra7cU/rtceSRks8OAyl0ev9INRm3cUDQW+JBOmUPL6E4nGS4ed6CeSKLKUYtT39JuJts/TjgHQ5lEU1dq6twJ4daXn+E/h7dRbKKUHwi8sMRD9Z9jE1S/bn3QWP
Run this query: select status, started_time, ended_time, millis, job_message from grouper_loader_log where JOB_NAME = 'MAINTENANCE_cleanLogs';
SUCCESS
11/23/2016 6:00
11/23/2016 6:03
197574
Deleted 22677 records from grouper_loader_log older than 7 days old. Deleted 19232 records from grouper_change_log_entry older than 14 days old. (1478689222184000)
SUCCESS
11/24/2016 6:00
11/24/2016 6:02
135615
Deleted 22722 records from grouper_loader_log older than 7 days old. Deleted 7957 records from grouper_change_log_entry older than 14 days old. (1478775621878000)
SUCCESS
11/25/2016 6:00
11/25/2016 6:01
78362
Deleted 22723 records from grouper_loader_log older than 7 days old. Deleted 4357 records from grouper_change_log_entry older than 14 days old. (1478862015949000)
SUCCESS
11/26/2016 6:00
11/26/2016 6:07
431774
Deleted 22723 records from grouper_loader_log older than 7 days old. Deleted 26273 records from grouper_change_log_entry older than 14 days old. (1478948430228000)
SUCCESS
11/27/2016 6:00
11/27/2016 6:02
130949
Deleted 22725 records from grouper_loader_log older than 7 days old. Deleted 4504 records from grouper_change_log_entry older than 14 days old. (1479034827254000)
SUCCESS
11/28/2016 6:00
11/28/2016 6:00
38121
Deleted 21311 records from grouper_loader_log older than 7 days old. Deleted 191 records from grouper_change_log_entry older than 14 days old. (1479121223390000)
SUCCESS
11/29/2016 6:00
11/29/2016 6:01
79169
Deleted 22702 records from grouper_loader_log older than 7 days old. Deleted 2439 records from grouper_change_log_entry older than 14 days old. (1479207627390000)
SUCCESS
11/30/2016 6:00
11/30/2016 6:05
308820
Deleted 22709 records from grouper_loader_log older than 7 days old. Deleted 30572 records from grouper_change_log_entry older than 14 days old. (1479294025078000)
Are you getting successes?
I think what can happen is the database can choke on the delete query since there are so many records. Can you remove the records with a loop of SQL? If we need to change the logic we can delete records a chunk at a time… though I haven’t seen this problem before in Grouper (I have seen it in other systems though)
Thanks
Chris
From: [mailto:] On Behalf Of Ben Beecher
Sent: Tuesday, November 29, 2016 11:18 AM
To:
Subject: [grouper-users] old records not removed from grouper_change_log_entry table
For the past two weeks we've been dealing with disk space issues in our Grouper database. On 11/10 the data tablespace grew very large, apparently because we had assigned view privileges to a large number of users. We have about 41700 reference groups and we had assigned the view privilege to each group for about 130000 users. This produced a large number of transactions and the grouper_change_log_entry table grew very large. On 11/17 there were 148 million records in that table and it was growing by 16 million records per day. Our data tablespace grew from about 30GB to 171GB. We truncated the grouper_change_log_entry table and we added these lines to the grouper-loader.properties file and restarted the loader:
loader.retain.db.logs.days=1
loader.retain.db.change_log_
entry.days=1
We removed the view privileges for those 130000 users to the reference groups and that created several million new transactions. We expected the table to shrink but it still has 131 million records. It is currently growing by about 4133 records per day. The old records are not being removed. Our data tablespace has grown to 179GB.
Why are the old records not being removed from the grouper_change_log_entry table?
Should we truncate the table again?
The created_on field should contain milliseconds since epoch but those values are much larger than expected (E+15 instead of E+12):
sql> select (sysdate - to_date('01-Jan-1970', 'dd-Mon-yyyy')) * 86400000 from dual;
1.4804E+12 (millis since epoch for today)
sql> select created_on,TO_DATE('1970-01-
01','YYYY-MM-DD') + created_on / 86400000 from grouper_change_log_entry where sequence_number=166996954;
CREATED_ON TO_DATE('
---------- ---------
1.4794E+15 25-OCT-14 (millis since epoch for the oldest record in that table)
sql> select created_on,TO_DATE('1970-01-
01','YYYY-MM-DD') + created_on / 86400000 from grouper_change_log_entry where sequence_number=297672536;
CREATED_ON TO_DATE('
---------- ---------
1.4804E+15 23-AUG-46 (millis since epoch for the newest record in that table)
I set log level to DEBUG and I did not see any error messages in the log regarding the grouper_change_log_entry table.
Ben
- Re: [grouper-users] old records not removed from grouper_change_log_entry table, Ben Beecher, 12/08/2016
- RE: [grouper-users] old records not removed from grouper_change_log_entry table, Hyzer, Chris, 12/08/2016
- RE: [grouper-users] old records not removed from grouper_change_log_entry table, Hyzer, Chris, 12/30/2016
Archive powered by MHonArc 2.6.19.