You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this PR, we start writing schema validation progress in the schema worker. Adds `SchemaValidationProgressTracker` to manage the logic of updating progress without doing too many writes (sets an arbitrary threshold of 500 docs or 5% of the number of documents to validate). Schema validation progress only exists for `Pending` and `Validated` schemas. When we mark a schema as `Overwritten`, `Active`, or `Failed`, the progress document is deleted.
This has a nice side effect in notifying the schema worker in the case that another schema has been submitted or a document update failed validation, so we can stop validating the schema when we encounter missing schema progress. This fixes an issue where the worker would have to run schema validation to completion on a previous pending schema when a new pending schema is submitted (e.g. if someone pushes code, realizes their schema will take too long to validate, and fixes it, they still would have to wait for the first schema validation to complete). With this change, that's no longer the case. Fixes [ENG-9710](https://linear.app/convex/issue/ENG-9710/schema-validation-cancelation)
GitOrigin-RevId: c6e725b36f4b0f26bb1d601ee3e9dfecce5e141b
0 commit comments