0
0
mirror of https://github.com/tursodatabase/libsql.git synced 2025-06-16 01:42:59 +00:00

45 Commits

Author SHA1 Message Date
7668db8be4 server: fix hrana error classification ()
* server: fix hrana error classification

* add new test snapshots

* more snapshots
2024-06-05 16:34:12 +00:00
b9ab41c485 ignore legacy auth when new auth is present () 2024-03-13 06:30:53 +00:00
153c8382d8 remove broken test () 2024-03-12 18:00:30 +00:00
d945d41566 Hrana: don't close the stream at the end of prepared statement execution ()
* Hrana: don't close the stream at the end of prepared statement execution

* hrana stream and transaction: check for tokio runtime existence on drop

* standalone::execute_transaction test: raise simulation duration

* hrana: added comments to conditions for stream closing

* hrana: added comments to conditions for stream closing
2024-03-12 11:57:07 +00:00
5ece28f4fe gid tag token claim () 2024-03-11 16:14:52 +00:00
1528128fce allow ddl override () 2024-03-11 15:00:26 +00:00
998d330428 extend test timeout () 2024-03-09 11:39:39 +00:00
6b13d77519 libsql: Deasyncify some Conn trait methods ()
There's no reason to have `is_autocommit()`, `changes()` or
`last_insert_row()` methods async because they're all fully local and
cannot block. Deasyncify them.
2024-03-05 13:44:53 +00:00
612aae4277 server: trim quotes in namespace string in attach statement ()
* Add a regression test when UUIDs are used in attach
statements

Also, added a test to check if the UUID is wrapped
in quotes

* bugfix: trim namespace string if it is wrapped in quotes

the client might send namespace wrapped in quotes in case of uuids,
so we will just trim the string.
2024-03-01 15:08:01 +00:00
adf36104ad fix bad attach name ()
* add test

* fix auth using attach alias instead of target
2024-02-29 14:15:43 +00:00
4b2732c5e2 Go: Reset connection when it's returned to a pool ()
* Make all methods of Conn trait async

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

* C bindings: Add libsql_reset

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

---------

Signed-off-by: Piotr Jastrzebski <piotr@chiselstrike.com>
2024-02-29 10:09:07 +00:00
16c6e40335 fix auth malformed token ()
* add tests

* allow legacy tokens with no perm claims

* fmt
2024-02-28 14:16:27 +00:00
52d8b8f1c4 Multi-scopes auth & Attach fix ()
* test snapshots

* allow multi-scope auth

* hors-sujet: fix C compile warning

* update jwt and add hashbrown feature

* replace Auth with RequestContext

* extract RequestContext

* fix auth check for multi-scopes

* pass NamespaceName in StmtKind::Attach

* fallback to global auth if key is not set in ns config

* add allow_attach to namespace creation

* return meta store from namespace store

* test attach

* fmt

* review edits
2024-02-26 13:56:20 +00:00
954029e31f libsql: add Builder to construct the db ()
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
37fb629f50 run clippy () 2024-01-31 08:42:20 +00:00
6f67c65a40 Consolidate Hrana proto definitions in one source ()
* Hrana HttpConnection: use shared Hrana stream

* added is_autocommit flag setup during execute requests

* post-rebase fixes

* Hrana HttpConnection: use shared Hrana stream

* added is_autocommit flag setup during execute requests

* halfway

* deduplicated transaction scope counting

* applied changes on wasm connection

* moved the remaining proto definitions

* fixed libsql-sys feature issues
2024-01-29 11:56:07 +00:00
080d1114cc stop swallowing errors 2024-01-23 07:09:30 +01:00
522e90b556 conditional stream close on non-transactional executes 2024-01-23 07:09:30 +01:00
20323aa898 adjusted tests 2024-01-23 07:09:30 +01:00
1ab40778cc added is_autocommit flag setup during execute requests 2024-01-23 07:09:30 +01:00
5a15ee014c Hrana HttpConnection: use shared Hrana stream 2024-01-23 07:09:28 +01:00
e4d427c830 fixed cursor step error protocol mismatch 2024-01-16 08:23:08 +01:00
38ad7ef6bd adjusted metrics counter 2024-01-16 08:23:08 +01:00
67678167ed changed RowsInner API to make next row method async 2024-01-16 08:23:08 +01:00
23c2cbd4ce sqld: Add fault and http response metrics 2023-11-28 16:37:03 -05:00
84ee1e80c0 test namespace creation on dirty instance 2023-11-17 08:43:35 -06:00
536ce5095c rename(pkg): rename lib to libsql-server, keep bin as sqld 2023-11-17 08:43:05 -06:00
ecff30bb65 test namespace creation on dirty instance 2023-11-17 14:45:05 +01:00
83e5af2813 add xtask test, fix metrics tests 2023-11-09 10:56:44 -05:00
5b1e1c245b Add client version reporting metrics
This commit adds a new `x-libsql-client-version` header emitted by
clients. The server will collect these values and emit them as a
`libsql_client_version{version="libsql-hrana-0.1.11"}`. This also
exposes special doc hidden functions that our other clients that use the
rust one to emit their own metric.

Closes 
2023-11-07 19:39:01 -05:00
5df434fa6f Merge pull request from tursodatabase/add-prom-metrics
more prom metrics
2023-11-07 23:32:53 +00:00
42a83894c2 ignore metrics test for futher investigation 2023-11-07 18:16:26 -05:00
4be1f090b1 sleep in basic_metrics for ci 2023-11-07 17:49:58 -05:00
7d5d86c856 remove guage check in basic_metrics test 2023-11-07 17:18:30 -05:00
2d197918b8 run rustfmt 2023-11-07 16:35:52 -05:00
0a6cb0451d Merge branch 'main' into fix-hrana-rusqlite-error-handling 2023-11-07 16:32:00 -05:00
0259bf8729 fix basic_metrics test 2023-11-07 16:27:27 -05:00
513b3cb4c2 update snapshot 2023-11-07 16:00:27 -05:00
392f2059a0 add test for random rowid 2023-11-07 15:42:20 -05:00
d433884baa add snapshot 2023-11-07 15:38:44 -05:00
86e8683176 fix hrana handling of rusqlite error 2023-11-07 18:33:23 +01:00
ab6feaab88 sim-tests: add asserts for metrics 2023-11-03 11:32:41 -04:00
ab354d156a fix embedded replica tests 2023-10-31 09:22:30 -04:00
736d077e36 join simulation test creation 2023-10-31 09:22:30 -04:00
71ca43a7b6 make sqld compile 2023-10-17 17:41:26 +02:00