tursodatabase / tursodatabase/libsql

Schema migration - tracking issue

Open
#1,123 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

database per tenant enhancement
Dominant language
C
Stars
17.2k
Forks
531
Avg merge
1h 12m
Merged PRs (30d)
1

Description

implements the happy path of schema migration. do not use this feature yet.

Here a list of remaining work to get schema migration working properly:

  • move all the migration-related stuff from the meta_store to the schema module; let the scheduler use its own connection to the meta store. (#1131)
  • migration-specific result builder (#1146 )
  • perform error handling, check migration success status, use custom QueryResultHandler to collect results (#1146)
  • ensure that the temp table enqueued_tasks is updated corectly after a task is popped when a tasks status changed (maybe use a trigger?) (#1126)
  • handle abort; first when a dry run failed, then if a user abort the migration before the dry-run is complete (#1163)
  • prevent a job from being enqueued if there is still a pending job for that namespaces (#1131)
  • prevent writes while there is are pending jobs in a database (https://github.com/tursodatabase/libsql/pull/1139)
  • backup database before starting migration (#1140)
  • backup meta store after enqueue job (#1144)
  • track version schema
  • go through all todos that I left in the code
  • when performing a task, and that task was already performed, report the status, and don't re-perform the task (#1136)
  • When a new db is created with a shared schema, bootstrap schema with current schema version. (#1154)
  • prevent db creation while schema has pending migration it (#1137)
  • admin API collect status of job (#1134)
  • shared schema options should only be settable at creation (not possible through config update)
  • ensure migration doesn't contain any transaction statements (#1149)
  • deadlock in ns_loaded_with_pending_tasks_writes_is_blocked (#1173)
  • prevent new migrations if a namespace creation is under way. (i.e. a new namespace creation should not miss fresh migration) (#1183)
  • test schema delete

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 by reviewing the remaining unchecked items: the TODOs in the code and the missing schema-delete test. Trace the existing schema-migration work and linked issues to identify the relevant entry points and test locations. Done means the outstanding work is completed and schema deletion is covered by a test.

Written by the indexing model from the issue text.

Assessment

Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.