You're reading docs for Nextly Alpha. APIs may change between releases.

CLIError codes

COLLECTION_BEING_CHANGED

A change that deletes values lost its hold of the collection part way, so it stopped before its next statement.

Cause

A change that deletes values lost its hold of the collection part way, so it stopped before its next statement.

A Schema Builder change that deletes stored values holds its collection from the moment it counts them until the change is recorded, so that entry writes wait for it. Some of its statements run on other connections than the one holding the collection. Just before each, the change asks whether its hold still stands; this one found it gone, because the connection holding it ended, so other writes could already go ahead. It sent nothing more. The question is asked before a statement, not with it, so a hold lost between the answer and the statement is seen only by the next one.

Fix

  • Review the change in the Schema Builder: what it would delete may have changed while it was not held.
  • Then make it again.

Example

✗ The change stopped before its next statement.
  Why:  It no longer held its collection, so other writes could go ahead, and what it would delete was counted under a hold that is gone.
  Next: Review the change and make it again.
  Docs: https://nextlyhq.com/docs/cli/errors/collection-being-changed  (COLLECTION_BEING_CHANGED)

On this page

Was this page helpful?