Deleting a netbox is extremely slow

Bug #1038943 reported by Morten Brekkevold
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Network Administration Visualized
Confirmed
Undecided
Unassigned

Bug Description

This has been known for some time, but we need a bug number to reference it.

Deleting a row from the Netbox table will cascade to almost every other table in the system; sometime just to delete relations, sometimes to update timestamps or null out relations, such as in the case of the Cam table.

A switch that has been logging cam records for a while may have amassed millions of rows in the Cam table, unless this has been cleaned. Since we don't delete historical records, the netbox foreign key in Cam is just nulled out. This means updating millions of rows. This can be extremely time consuming.

There may not be much we can do to speed up this process in the way of database redesign, and it may not be worth the effort, considering that deleting a netbox is something a user would do rather seldom

The problem is mostly that of the user experience in SeedDB, where the page will seem to take forever to load after pressing the Confirm-button of a delete operation. The best solution may be to defer the actual deletion to a background task.

Tags: seeddb
Fredrik S (frsk)
security vulnerability: no → yes
Revision history for this message
Morten Brekkevold (mbrekkevold) wrote :

Fredrik, what?

security vulnerability: yes → no
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.