tursodatabase / libsql

libSQL is a fork of SQLite that is both Open Source, and Open Contributions.
https://turso.tech/libsql
MIT License
9.54k stars 252 forks source link

Bug with schema migration when tasks status do not reflect the job status #1564

Open MarinPostma opened 2 months ago

MarinPostma commented 2 months ago

We found a bug with the schema migration scheduler where a job with two tasks was in status Enqueued where the tasks were in status DryRunSuccess and RunSuccess. The scheduler would get stuck because it was expecting tasks in status Enqueue and found none. The scheduler should be more resilient to this, and update the job status if a tasks is found in an unexpected state.

This is likely due to a crash.