[ 
https://issues.apache.org/jira/browse/AMBARI-25458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17274562#comment-17274562
 ] 

amarnath reddy pappu commented on AMBARI-25458:
-----------------------------------------------

By this time Ambari would have already purged most of the historical purge 
data, so it is safe to  stop the purging command and leave it like that.

 

other option is truncating alert_current, alert_history and alert_notice tables.

> DB Purge takes lot of time/hung
> -------------------------------
>
>                 Key: AMBARI-25458
>                 URL: https://issues.apache.org/jira/browse/AMBARI-25458
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 2.7.5
>            Reporter: amarnath reddy pappu
>            Priority: Major
>
>  
> During the DB Purge - alert_history table clean up is not doing with batch - 
> Ambari gets hung or takes lot of time.
>  
> {noformat}
> 2020-01-15 22:36:39,384  INFO [main] AlertsDAO:1537 - Deleting AlertCurrent 
> entity batch with history ids: 533910 - 534898
> 2020-01-15 22:36:39,392  INFO [main] AlertsDAO:1537 - Deleting AlertCurrent 
> entity batch with history ids: 534900 - 536020
> 2020-01-15 22:36:39,398  INFO [main] AlertsDAO:1537 - Deleting AlertCurrent 
> entity batch with history ids: 536022 - 537203
> 2020-01-15 22:36:39,404  INFO [main] AlertsDAO:1537 - Deleting AlertCurrent 
> entity batch with history ids: 537092 - 537633
> 2020-01-15 22:36:39,411  INFO [main] AlertsDAO:1570 - Starting: Delete/update 
> entries older than [ 1531180800000 ] for entity [class 
> org.apache.ambari.server.orm.entities.AlertHistoryEntity]
> 2020-01-15 22:43:48,235  INFO [main] AlertsDAO:1581 - Completed: 
> Delete/update entries older than [ 1531180800000 ] for entity: [class 
> org.apache.ambari.server.orm.entities.AlertHistoryEntity]. Number of entities 
> deleted: [19480]
> 2020-01-15 22:43:48,259  INFO [main] CleanupServiceImpl:80 - Running the 
> purge process for DAO: 
> [org.apache.ambari.server.orm.dao.RequestDAO$$EnhancerByGuice$$f11e85aa@677349fb]
>  with cleanup policy: 
> [org.apache.ambari.server.cleanup.TimeBasedCleanupPolicy@4466cf5d]
> 2020-01-15 22:43:48,283  INFO [main] RequestDAO:314 - Deleting 
> ExecutionCommand entities before date Tue Jul 10 00:00:00 UTC 2018
> 2020-01-15 22:43:48,284  INFO [main] RequestDAO:314 - Deleting 
> TopologyLogicalTask entities before date Tue Jul 10 00:00:00 UTC 2018
> 2020-01-15 22:43:48,284  INFO [main] RequestDAO:314 - Deleting 
> TopologyHostTask entities before date Tue Jul 10 00:00:00 UTC 2018
> 2020-01-15 22:43:48,284  INFO [main] RequestDAO:314 - Deleting 
> TopologyHostRequest entities before date Tue Jul 10 00:00:00 UTC 2018
> 2020-01-15 22:43:48,284  INFO [main] RequestDAO:314 - Deleting 
> HostRoleCommand entities before date Tue Jul 10 00:00:00 UTC 2018
> 2020-01-15 22:43:48,285  INFO [main] RequestDAO:349 - Deleting 
> RoleSuccessCriteria entities before date Tue Jul 10 00:00:00 UTC 2018
> 2020-01-15 22:43:48,285  INFO [main] RequestDAO:349 - Deleting Stage entities 
> before date Tue Jul 10 00:00:00 UTC 2018
> 2020-01-15 22:43:48,285  INFO [main] RequestDAO:314 - Deleting 
> RequestResourceFilter entities before date Tue Jul 10 00:00:00 UTC 2018
> 2020-01-15 22:43:48,285  INFO [main] RequestDAO:314 - Deleting 
> RequestOperationLevel entities before date Tue Jul 10 00:00:00 UTC 2018
> 2020-01-15 22:43:48,285  INFO [main] RequestDAO:314 - Deleting Request 
> entities before date Tue Jul 10 00:00:00 UTC 2018
> 2020-01-15 22:43:48,288  INFO [main] CleanupDriver:100 - DB-PURGE - 
> completed. Number of affected records [22276]{noformat}
> During the DB Purge - alert_history table clean up is not doing with batch - 
> Ambari gets hung or takes lot of time.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to