Skip to content

Lock wait timeout exceeded when running Geo migration #7601

@melton-jason

Description

@melton-jason

Describe the bug
Currently on main (v7.12.0 development: e7123b6), databases created from the Specify 6 wizard receive a django.db.utils.OperationalError: (1205, 'Lock wait timeout exceeded; try restarting transaction') error when running the 0002_geo migration.

Below is a full traceback:
traceback.txt

The traceback states the error happens at the following lines:

create_cogtype_type_picklist(apps)

cog_type_picklist, _ = Picklist.objects.get_or_create(
name='SystemCOGTypes', # Default Collection Object Group Types
type=0,
collection=collection,
defaults={
"issystem": False,
"readonly": False,
}
)

This error does not occur on the same database when running migrations in earlier versions (e.g., v7.11.3).

To Reproduce
Steps to reproduce the behavior:

  1. Have or create a database made using the Specify 6 Wizard which hasn't had the 0002_geo migration executed
    a. If needed, provided below is a database created from the Specify Wizard
  2. Start up a dockerized Specify instance (or run migrations on a local Specify instance) on main or any version sufficiently past v7.11.3
  3. Inspect the containers logs and eventually observe the error

Here is a database created from the Specify Wizard with a single collection in a Botany discipline:

from_wiz.sql

Please fill out the following information manually:

  • OS: Apple M1 macOS Sonoma (14.3).
  • Specify 7 Version: v7.12.0 development / versions after v7.11.3

Metadata

Metadata

Assignees

Labels

regressionThis is behavior that once worked that has broken. Must be resolved before the next release.

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions