Skip to main content

DEBT.STANDING_UNKNOWN — the catalog cannot say where a recorded debt stands

  • Category: safety
  • Level: 0
  • Stability: stable
  • Suites: audit, deploy

The ledger records a debt, and the live catalog cannot say whether it is still owed. The finding is undetermined, and its reason says which of three cases it is.

The three cases​

An expand without its contract whose added column is still there (debt_standing_not_in_catalog). The entry names the column the expand added, qualified through its table's schema when the migration named one, and nothing else: not the table, and not the column it replaces. So the catalog can show that the added column is still there, which is where it stays after a finished expand/contract too, and it cannot show whether the old column is gone.

A debt this build has no catalog question for (debt_standing_not_in_catalog). On MySQL that is every debt, because this build has no debt reader for that engine. On PostgreSQL it is a kind a later release records that this one does not know.

The read failed (catalog_read_failed). The question was put and the catalog could not be read: a role that lost a privilege, a connection the server closed. The next run with a readable catalog answers it.

Why this is not DEBT.OBJECT_NOT_FOUND​

DEBT.OBJECT_NOT_FOUND says the catalog was asked and does not show the object, and it sends you to look for a dropped table, a schema outside the run's scope or a missing privilege. In none of the three cases above was anything found missing, so that sentence would send you after a table that is still there.

What to do​

For an expand, settle it from the repository: once the contract migration is in, sqlens:lint --debt=record no longer finds the debt and takes an open entry off the account. For a debt this build cannot ask about, the entry stays until the repository side settles it the same way. For a failed read, fix what stopped the read and run again.