0
0
mirror of https://github.com/tursodatabase/libsql.git synced 2025-08-27 06:55:05 +00:00
Commit Graph

20 Commits

Author SHA1 Message Date
ad hoc
3eb819dbac fixup! add durable frame_no to proto 2024-09-04 10:58:04 +02:00
ad hoc
d55408200b add durable frame_no to proto 2024-09-04 10:58:03 +02:00
ad hoc
d29ca7fabe fix conflicts 2024-08-10 12:21:01 +02:00
ad hoc
4b5baacad5 introduce libsql injector 2024-08-10 09:45:36 +02:00
Avinash Sajjanshetty
15dca45139 Make PRAGMA synchronous configurable for a Namespace (#1533)
* Make PRAGMA synchronous configurable for a Namespace

SQLite allows setting synchronous values to any four levels. This
patch provides an option to set the level for a namespace which will
be used for every connection. It defaults to `NORMAL`.

allowed values: https://www.sqlite.org/pragma.html#pragma_synchronous

e.g. to enable:

    curl -X POST http://sqld-admin-endpoint/v1/namespaces/<namespace>/config -H "Content-Type: application/json" -d '{"durability_mode": "strong"}' -v

* Make `durability_mode` field optional in proto

* Set `default` in the enum

Co-authored-by: ad hoc <postma.marin@protonmail.com>

---------

Co-authored-by: ad hoc <postma.marin@protonmail.com>
2024-07-10 09:34:29 +00:00
Bartosz Sypytkowski
62275b5bc7 Parametrize namespace creation for shared schema db (#1049)
* initial parameters for creation of shared schema db

* store shared schema config persistently

* add StmtKind::DDL and block DDL schema changes on databases using shared schema

* Revert "add StmtKind::DDL and block DDL schema changes on databases using shared schema"

This reverts commit 5a5c0d62c91d72151a1c92309d8746116c518ad5.
2024-02-20 14:21:55 +00:00
ad hoc
d2fcc25094 limit row size (#1043)
* update proto

* limit row size
2024-02-20 12:45:24 +00:00
Piotr Sarna
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
ad hoc
e4905983a4 update proto 2024-01-18 20:50:02 +01:00
Lucio Franco
8d10b634d7 server: add jwt_key to database config 2024-01-11 09:42:38 -05:00
Lucio Franco
b21d23e9db server: switch to protobuf for meta store 2024-01-11 09:40:05 -05:00
Lucio Franco
7992ae11c8 replication: add config to handshake 2024-01-09 16:19:22 -05:00
ad hoc
971dbb842a add timestamp to replication protocol 2023-12-26 11:16:16 +01:00
ad hoc
d7b65533cf add primary replication index to Hello response 2023-11-07 17:57:16 +01:00
ad hoc
54895cb167 proxy proto: change txn state to is_autocommit 2023-11-07 12:41:31 +01:00
ad hoc
f92feb0cc1 Merge pull request #507 from tursodatabase/streaming-proxy
streaming proxy
2023-11-03 10:27:49 +00:00
ad hoc
84a8fd1825 make proto backwark compatible 2023-11-02 16:25:34 +01:00
ad hoc
f6d73619f9 add streaming replication proto 2023-10-31 17:10:31 +01:00
ad hoc
4a3a31836b session based handshake 2023-10-30 17:26:19 +01:00
ad hoc
2e42c635b5 move rpc to libsql-replication crate 2023-10-30 17:26:14 +01:00