turso-cli icon indicating copy to clipboard operation
turso-cli copied to clipboard

CLI suggests running 'db replicate' to fix a partially create database

Open penberg opened this issue 1 year ago • 2 comments

If you, for example, cancel turso db create command before it managed to spawn an instance, you will end up with a database that you cannot connect to. Some of the commands suggest running db replicate to remedy the situation, but this is confusing. Let's do a db doctor, db create --fix or similar command instead to make it explicit that you're repairing a broken database.

penberg avatar Jul 17 '23 12:07 penberg

Let's not show broken databases to users instead.

When they list databases, let's hide the ones without instances. When they create one that exists but has no instances, we just create the instance in the existing app.

Then we fix the problem on our side, instead of giving this responsibility to the user.

athoscouto avatar Jul 17 '23 13:07 athoscouto

If we choose not to list broken databases, we'd have to make sure that a broken database doesn't count against the quota (or they can destroy the broken database manually), otherwise a user could find themselves into a situation where they are stuck with no way of moving forward on their own, and no way to even observe or diagnose the problem.

CodingDoug avatar Jul 17 '23 14:07 CodingDoug