Skip to content

IPAM migration 0072 not performant with large number of existing prefixes #18438

@jeremystretch

Description

@jeremystretch

Deployment Type

NetBox Cloud

NetBox Version

v4.2.2

Python Version

3.10

Steps to Reproduce

  1. Create a large number of prefixes (e.g. 20,000) in a previous NetBox release.
  2. Upgrade to NetBox v4.2.0 or later.

Expected Behavior

The database migrations should complete within a reasonable amount of time.

Observed Behavior

The 0072_prefix_cached_relations migration within the ipam app can take an excessively long time to complete when there exist many thousands of prefixes in the database. This is due to a missing batch_size parameter in the bulk_update() operation.

Metadata

Metadata

Assignees

Labels

severity: mediumResults in substantial degraded or broken functionality for specfic workflowsstatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions