JavaScript promise rejection: Loading CSS chunk index-domready failed. (error: https://sirherobrine23.com.br/assets/css/index-domready.9de057c0.css). Open browser console to see more details.
0
0
mirror of https://github.com/tursodatabase/libsql.git synced 2025-07-11 11:09:26 +00:00
Commit Graph

34 Commits

Author SHA1 Message Date
4ecf2a5ecd server: fix conflict on attach update (#1233)
* server: fix conflict on attach update

* add tests and add on conflict to other branch

* only error on server errors

* remove test query

* add more on conflicts fixes

* Revert "add more on conflicts fixes"

This reverts commit 9cef2d320e.

* remove replace for meta store inserts
2024-03-20 12:41:05 +00:00
1fc0550a65 harden attach (#1206)
* pass namespace path resolver to VM instead of hacky dir walking

* test attach forbidden in migration

* fmt
2024-03-14 15:31:38 +00:00
a2077c54ab Fix namespace deletion (#1211)
* fix schema deletion

* optional ns delete payload
2024-03-14 11:35:20 +00:00
0d5dc18ce1 rename migration tables (#1200)
* rename __libsql_migration_tasks to sqlite3_libsql_tasks

* rename job tables
2024-03-13 11:03:55 +00:00
c79cec3ee2 move migration api to user api (#1198) 2024-03-12 20:09:07 +00:00
a95bdf4d35 job status notifier & wait for dry run success (#1197) 2024-03-12 19:55:41 +00:00
fe2ebffe28 check schema migration auth (#1191) 2024-03-11 17:09:43 +00:00
1528128fce allow ddl override (#1187) 2024-03-11 15:00:26 +00:00
998d330428 extend test timeout (#1182) 2024-03-09 11:39:39 +00:00
226fba9a12 Add tests for data migration in schema dbs (#1176)
- Added a test which performs data migration including
  inserts, updates and deletes
- Added a test which shows that schema migration fails
  if there is any conflicting data in the linked dbs
2024-03-08 16:11:26 +00:00
ae708f8952 Fork a new DB when creating from shared schema (#1154)
* Fork a new DB when creating from shared schema

* Use the correct db type to get the wal logger

* Add a test for a new db in shared schema

- When a new db is created with a shared schema, it should have
  the same schema and the schema version
- When a new migration is done, the new db and all the existing
  dbs should have the same schema and version

* Move schema db fork logic inside namespace mod

* clean up and remove unnecessary store call
2024-03-08 14:32:22 +00:00
c9ba69245e Handle dry run failure, and abort migration (#1163)
* test snasphots

* add test

* handle dry run failure, and abort all tasks

* fmt
2024-03-08 11:01:32 +00:00
73909accf6 Update tests to check if all schema versions are same (#1170) 2024-03-08 08:58:27 +00:00
bf19f3e1d7 reject migration containing migration statements (#1149) 2024-03-06 18:12:45 +00:00
75321d56d3 use custom query builder to collect migration error (#1146)
use custom query builder to collect migration error
2024-03-06 15:31:46 +00:00
8f897d510e Block writes during schema migration (#1139)
* Add block_writes to Connection

Signed-off-by: Piotr Jastrzebski <piotr@chiselstrike.com>

* Add block_writes to PrimaryDatabase

Signed-off-by: Piotr Jastrzebski <piotr@chiselstrike.com>

* Use block_writes in Connection::run

Signed-off-by: Piotr Jastrzebski <piotr@chiselstrike.com>

* Unblock writes once migration is finished

Signed-off-by: Piotr Jastrzebski <piotr@chiselstrike.com>

* Block writes on startup if there are pending migration tasks

Signed-off-by: Piotr Jastrzebski <piotr@chiselstrike.com>

* Block writes when a migration task is enqueued

Signed-off-by: Piotr Jastrzebski <piotr@chiselstrike.com>

* twix

---------

Signed-off-by: Piotr Jastrzebski <piotr@chiselstrike.com>
Co-authored-by: ad hoc <postma.marin@protonmail.com>
2024-03-05 22:17:36 +00:00
bb1dd03748 Migrations status admin api (#1134)
* added an endpoint to ask for a general migration status

* return detailed information about individual migration job progress

* integrated migrations API in tests

* post-rebase

* adjusted code after rebase
2024-03-05 16:20:30 +00:00
50648a6b4b prevent task enqueue when pending task (#1131)
check for already enqueued job for schema + migrate schema db ops to
schema module.
2024-03-05 10:31:06 +00:00
2b06b6b7d8 schema migration (#1110)
happy path schema migration
2024-03-04 13:15:29 +00:00
eb7dadd6a0 libsql: attach databases from other namespaces as readonly (#784)
* libsql: attach databases from other namespaces as readonly

With this proof-of-concept patch, other namespaces hosted
on the same sqld machine can now be attached in readonly mode,
so that users can read from other databases when connected
to a particular one.

* connection: add allow_attach to config

Default is false, which means connections are blocked from attaching
databases. If allowed, colocated databases can be attached in readonly
mode.

Example:
→  attach another as another; select * from another.sqlite_master;
TYPE      NAME     TBL NAME     ROOTPAGE     SQL
table     t3       t3           2            CREATE TABLE t3(id)

* libsql,namespaces: add client-side ATTACH support

* attach: support ATTACH x AS y aliasing

We're going to need it, because the internal database names in sqld
are uuids, and we don't expect users to know or use them.

* attach: fix quoted db names

In libsql-server, raw db names are uuids that need to be quoted,
so that needs to be supported in the ATTACH layer.
As a bonus, "names" that are actually file system paths are refused
to prevent abuse.

* libsql-server: drop stray serde(default) from allow_attach

* libsql-replication: update proto files

* libsql-replication: regenerate protobuf

* tests: move attach to its own test

* libsql-replication: fix proto number after rebase
2024-02-14 10:41:45 +00:00
954029e31f libsql: add Builder to construct the db (#993)
This adds a new `Builder` type that can now be used to construct the
`Database` type. This will scale better as we add more varied options.
This commit also deprecates the old builder types and will produce a
warning that will push users to using the new `Builder` type. This will
then allow us to remove the old deprecated constructors at some point in
the future.
2024-02-06 13:59:11 +00:00
ce3da312df namespaces: more quoting fixes 2024-01-19 08:22:57 +01:00
67678167ed changed RowsInner API to make next row method async 2024-01-16 08:23:08 +01:00
d1ad860288 Merge pull request #875 from tursodatabase/lucio/config
server: add replicated db config
2024-01-10 13:55:41 +00:00
f97a82e9f8 fixing namespaces::delete_namespace uncovers a bug 2024-01-10 07:03:56 +01:00
20df3a18e5 server: add replicated db config 2024-01-09 16:19:30 -05:00
b1da52c722 server: Add initial MetaStore
This PR adds a new internal metadata store for namespace configuration.
This internally uses a normal namespace so that the replica also get's
synchronized. This is just initial work there are a few more issues to
solve regarding replica's getting updated configs and some internal
hardening that needs to be done. Tracking issue for follow up work #768.

Closes #501
2023-12-12 10:38:45 -05:00
536ce5095c rename(pkg): rename lib to libsql-server, keep bin as sqld 2023-11-17 08:43:05 -06:00
86b0328254 add test snapshot files 2023-10-31 17:10:59 +01:00
736d077e36 join simulation test creation 2023-10-31 09:22:30 -04:00
5d9fd529fc use abstract Replicator in libsql-server 2023-10-30 17:26:17 +01:00
4879f4ccc2 Revert "Revert "Same-thread frame injection (#695)" (#775)"
This reverts commit 85b3358a4d.
2023-10-30 17:25:28 +01:00
f15800793a re-enable embedded replica tests 2023-10-19 09:11:25 +02:00
71ca43a7b6 make sqld compile 2023-10-17 17:41:26 +02:00