v3.6 database migration logic is inefficient for large numbers of device types #8606

Closed
opened 2025-12-29 20:38:49 +01:00 by adam · 0 comments
Owner

Originally created by @jeremystretch on GitHub (Sep 12, 2023).

Originally assigned to: @arthanson, @jeremystretch on GitHub.

NetBox version

v3.6.1

Python version

3.8

Steps to Reproduce

This is an extension to bug #13605, which was addressed for device and virtual machines during the v3.6 beta testing period. The issue described therein impacts device types as well, as raised in discussion #13676.

Expected Behavior

Schema migrations should apply without error, and should not consume excessive disk space or memory.

Observed Behavior

Attempting to upgrade to v3.6.0 or later with a large number of device types (over 3,000 as tested) can trigger excessive disk space utilization due to inefficiencies in the component template count logic.

We should be able to resolve this in a manner similar to the fix for #13605.

Originally created by @jeremystretch on GitHub (Sep 12, 2023). Originally assigned to: @arthanson, @jeremystretch on GitHub. ### NetBox version v3.6.1 ### Python version 3.8 ### Steps to Reproduce This is an extension to bug #13605, which was addressed for device and virtual machines during the v3.6 beta testing period. The issue described therein impacts device types as well, as raised in discussion #13676. ### Expected Behavior Schema migrations should apply without error, and should not consume excessive disk space or memory. ### Observed Behavior Attempting to upgrade to v3.6.0 or later with a large number of device types (over 3,000 as tested) can trigger excessive disk space utilization due to inefficiencies in the component template count logic. We should be able to resolve this in a manner similar to the fix for #13605.
adam added the type: bugstatus: acceptedseverity: medium labels 2025-12-29 20:38:49 +01:00
adam closed this issue 2025-12-29 20:38:50 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8606