learningequality / learningequality/studio

IntegrityError: new row for relation "contentcuration_contentnode" violates check constraint "contentcuration_con...

Open
#3,164 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

TODO: needs reproduced
Dominant language
Python
Stars
191
Forks
307
Avg merge
5d 6h
Merged PRs (30d)
10

Description

Sentry Issue: STUDIO-EBQ

IntegrityError: new row for relation "contentcuration_contentnode" violates check constraint "contentcuration_contentnode_rght_check"
DETAIL:  Failing row contains (5fa258f566774723b861cf53eee1adb5, c51a0f842fed427c95acff9bb4a21e3c, Inclusive Education Resources, , 1, , 2021-05-18 01:03:14.587279+00, 2021-05-18 01:03:14.598927+00, t, 1, -10, 4026353, 0, null, topic, null, null, null, f, c51a0f842fed427c95acff9bb4a21e3c, {}, , null, null, null, null, null, null, null, null, null, f, f, learner, , , null).

  File "django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "django_prometheus/db/common.py", line 68, in execute
    return super(CursorWrapper, self).execute(*args, **kwargs)

IntegrityError: new row for relation "contentcuration_contentnode" violates check constraint "contentcuration_contentnode_rght_check"
DETAIL:  Failing row contains (5fa258f566774723b861cf53eee1adb5, c51a0f842fed427c95acff9bb4a21e3c, Inclusive Education Resources, , 1, , 2021-05-18 01:03:14.587279+00, 2021-05-18 01:03:14.598927+00, t, 1, -10, 4026353, 0, null, topic, null, null, null, f, c51a0f842fed427c95acff9bb4a21e3c, {}, , null, null, null, null, null, null, null, null, null, f, f, learner, , , null).

(11 additional frame(s) were not displayed)
...
  File "django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "django/db/utils.py", line 94, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "django/utils/six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "django_prometheus/db/common.py", line 68, in execute
    return super(CursorWrapper, self).execute(*args, **kwargs)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Sentry issue and the failing PostgreSQL constraint on the contentcuration_contentnode relation. Trace the code path that creates the failing ContentNode row and identify why rght is negative; done means the operation no longer violates the constraint and the failure is covered by an appropriate regression check.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, postgresql, python
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.