Project

General

Profile

Actions

Bug #8316

closed

Removing a long-standing host creates huge transaction

Added by Daniel Lobato Garcia over 9 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Category:
Database
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Removing a host with some reports (say 200), and each of them with several log lines (10000) generates 2.000.000 DELETE sql statements in the same transaction.
More often than not, ActiveRecord won't be able to make such a big transaction, in fact it will likely eat all memory available and Foreman will stop working in that host. In the best scenario the DB will end up with a non-committed giant transaction.

I suggest deleting hosts and reports manually on host destroy to avoid this.


Related issues 2 (1 open1 closed)

Related to Foreman - Bug #8565: report::expire is running very slowlyClosedDominic Cleal12/03/2014Actions
Related to Foreman - Refactor #1955: improve host deletion speedNew11/18/2012Actions
Actions #1

Updated by The Foreman Bot over 9 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/1907 added
  • Pull request deleted ()
Actions #2

Updated by Dominic Cleal over 9 years ago

  • Category set to Database
  • Assignee set to Daniel Lobato Garcia
Actions #3

Updated by Dominic Cleal about 9 years ago

  • Related to Bug #8565: report::expire is running very slowly added
Actions #4

Updated by Daniel Lobato Garcia about 9 years ago

Actions #5

Updated by Daniel Lobato Garcia almost 9 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #6

Updated by Dominic Cleal almost 9 years ago

  • translation missing: en.field_release set to 28
Actions

Also available in: Atom PDF