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-09 15:59:35 +00:00
Commit Graph

1638 Commits

Author SHA1 Message Date
81ba9c0605 Log checkpoint return status (#1398) 2024-05-17 10:04:38 +05:30
fce8a5ad8e Add an admin endpoint to checkpoint (#1390) 2024-05-15 20:31:08 +05:30
ae2c709194 Log namespace id in the checkpoint logs (#1387) 2024-05-15 20:22:31 +05:30
feb3ff090b release v0.24.8 2024-04-30 10:58:34 -04:00
195db50feb server: add config update txn_timeout (#1359)
* server: add config update txn_timeout

* add txn_timeout config to conn manager
2024-04-30 10:57:44 -04:00
20f56ad4a2 server: release v0.24.7 (#1320) 2024-04-16 18:27:37 +00:00
7708a43772 server: add query_duration_ms stats to query res (#1309)
* server: add `query_duration_ms` stats to query res

* hrana: default new stats fields
2024-04-15 16:37:13 +00:00
505b21f536 Fix sync (#1316)
Old implementation could never finish if the write is faster than
time needed to do two round-trips to primary.

For example it's enough to have a write every 200ms to make sync
never finish if it's done in embedded replica in Sydney
if the primary and the writer are in the US.

Signed-off-by: Piotr Jastrzebski <piotr@chiselstrike.com>
2024-04-15 14:31:15 +00:00
15fe600c40 update tonic to 0.11 (#1308) 2024-04-11 17:54:36 +00:00
dac888bbb7 server: add query stats to hrana responses (#1267)
* server: add query stats to hrana responses

* update spec with stats

* remove unused import

* fix snapshot

* more snapshots

* add stats to legacy api

* address comments
2024-04-11 16:23:21 +00:00
38da8f7d8c bump sqld v0.24.6 (#1298) 2024-04-10 10:41:35 +00:00
87d0145408 don't regen log on sqld version mismatch (#1296) 2024-04-09 17:48:48 +00:00
958f5613cc libsql: fix embedded replica multiple txn (#1287)
This commit fixes an issue where new connections for embedded replica's
with write delegation would not create a new "connection" on the server
causing weird issues with transactions and state. The fix here is to
create a new `client_id` when creating a new writer for a new connection
locally. This forces the server to use separate connections to execute
the writes.

Closes #1283
2024-04-05 20:44:31 +00:00
fa98db3c04 server: release v0.24.5 (#1286) 2024-04-05 20:14:29 +00:00
59b922b294 Fix simple queries for schema databases (#1285) 2024-04-05 19:57:06 +00:00
724f6db925 libsql: fix malformed db and add test (#1217)
* add malformed db test

* continue to debug output sql

* reduce sql

* reset connection on injection

* remove println in test

* address comments
2024-04-04 18:20:17 +00:00
00080c5983 server: add embedded replica stats test for replica (#1278) 2024-04-01 20:22:31 +00:00
9bb9cd4753 Add more logging in case snapshots fail (#1270)
We have a user with a failing snapshot, but we don't know why.
We know rename returns EINVAL, which could happen for a variety
of reasons, all of them related to the paths themselves.

By printing the path, we will be able to figure out the actual reason.
Right now we're shooting in the dark.
2024-04-01 16:13:14 +00:00
6fc29fcc5c Dedupe Hrana hello and repeated hello (#1266)
* deduplicated handling of hrana hello and repreated hello. Code is fully equivalent to the previous form. No change in logic.

* fixed early return

* lazy unwrapping

* made session fields private again

* fmt

* cleaned up nesting in conn

* fmt
2024-03-30 13:41:20 +00:00
fb647000a9 don't capture script output in scripted backup (#1269) 2024-03-28 15:06:37 +00:00
5cfb62f580 pass logid to backup script (#1231) 2024-03-27 17:05:24 +00:00
966757ab03 add libsql-hrana crate (#1260) 2024-03-25 23:07:55 +00:00
bce6a9680d server: allow explain queries without bind parameters (#1256)
allow explain queries without bind parameters

In SQLite, it is invalid to pass a query with a ? or named parameter
without a bind variable, unless you are just trying to explain the
command.

We always fail those queries, but we shouldn't.
2024-03-25 19:41:56 +00:00
10dbd512ce server: release v0.24.4 (#1259) 2024-03-25 18:41:30 +00:00
7781b011dc server: add shutdown timeout (#1258)
* server: add shutdown timeout

* add config cli/env var for timeout

* wire timeout
2024-03-25 18:00:46 +00:00
3bd8cf2b1f server: fix interactive txn schema panic (#1250)
* server: fix interactive txn schema panic

* fix txn check

* fix check errors

* Apply suggestions from code review

---------

Co-authored-by: ad hoc <postma.marin@protonmail.com>
2024-03-25 16:40:11 +00:00
bcf44515f6 prevent primary to remove itself in case of load error (#1253) 2024-03-23 18:26:46 +00:00
a26aebe140 fix conn upgrade lock (#1244)
fix deadlock on read transaction upgrade
2024-03-22 23:05:07 +00:00
45920ed30a bottomless: emit restored snapshot for waiters (#1252)
This fixes an issue where a db gets restored from bottomless and doesn't
get any writes until shutdown. At this point, the current generation is
the same as the restored one but the graceful shutdown process expects
to wait for that generation to be uploaded which never happens because
there are no writes. This change adds a snapshot generation emit call at
restore time to allow graceful shutdown to happen when there are no
writes without having to checkpoint and upload a new snapshot.
2024-03-22 20:57:10 +00:00
0f59ec0760 reenqueue stale reads on checkpoint (#1249) 2024-03-22 11:45:20 +00:00
0269dfdf2d server: fix incompatible logs reset race (#1247) 2024-03-22 09:30:26 +00:00
977d89c401 Make storage monitor efficient for large databases (#1246)
* Make storage monitor efficient for large databases

* Wrap page count pragmas in trasaction to guarantee atomicity
2024-03-21 21:08:48 +00:00
8d98f7929c fix timeout not being reset on connection after report (#1243) 2024-03-21 13:31:26 +00:00
56e3fe23ac write queue cleanup (#1242) 2024-03-21 12:21:03 +00:00
427421b9f3 Bottomless skip snapshot (#1238)
* skipp inject_replication_index on checkpoint

* bottomless: LIBSQL_BOTTOMLESS_SKIP_SNAPSHOT param

* restore required when generation is empty but dependency exists

* add tracing, limit busy handler retries

---------

Co-authored-by: ad hoc <postma.marin@protonmail.com>
2024-03-21 10:13:09 +00:00
ef446125f7 write queue (#1235)
* introduce connection manager

* remove unused wal methods

* remove lock stealer

* Make use of ConnectionManager in LibsqlConnection

it now takes a W: WalWrap instead of a WalManager. This is because we
want to inject the connection manager at the bottom of the wal wrapping
chain.

* add missing deps

* turn ReplicationLogger into a WrapWal

* update spots to to pass wal wrapper instead of wal manager

* remove dbg

* fmt

* fix sqlite3 rust tests
2024-03-20 22:27:13 +00:00
548acb0b5e server: prepare v0.24.3 release and forward port release branch (#1239)
* bump sqld version 0.24.0

* patch dist arm64 macos build && bump sqld

* fix ci again

* server: prepare v0.24.3 release

---------

Co-authored-by: ad hoc <postma.marin@protonmail.com>
2024-03-20 20:03:10 +00:00
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
9b533adff9 server: fix unhandled unwrap and remove backtraces (#1220) 2024-03-19 09:06:48 +00:00
721dbf2cbc use uuid v7 for log id (#1225) 2024-03-19 09:06:31 +00:00
1c9b995857 server: fix migration error hrana (#1228) 2024-03-19 09:06:05 +00:00
3b978fe086 Jw/changing how jwt is passed around (#1130)
* wip - passing userauthcontext instead of http headers

* revert comment out

* fixed temp change

* Merge branch 'main' into jw/changing-how-jwt-is-passed-around

* fixed failing tests

* next iteration of unit test fixing

* fixed remaining unit tests

* reverted debug

* removed accidentally added file

* moved str to userauthcontext conversion to from trait

* remove vague comment

* cargo fmt

* cleaned up mod reimportss

* refactored cryptic matching in replica_proxy

* marked potentially duplicate code with // todo dupe #auth

* refactored context to custome errors

* added a factory to produce empty UserAuthContext

* added constructors for UserAuthContext

* switched from try_into to using constructors

* cargo fmt

* added tests for failing cases in parsers

* cargo fmt

* added test for non-asci error

* fixed log message

* removed unnecessary error mapping

* turned context to result

* removing dummy tokens from tests

* cargo fmt + cleanup

---------

Co-authored-by: Julian <julian@Julians-MacBook-Pro.local>
2024-03-15 15:29:39 +00:00
faba38147d bump sqld version 0.24.0 (#1213) 2024-03-14 16:58:25 +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
3b46378935 catch parser panic (#1208) 2024-03-13 17:56:02 +00:00
965f3dc7d7 per-namespace sentinel (#1202) 2024-03-13 11:37:33 +00:00
3de73ef356 Namespace::destroy: add parameter to perform soft delete (preserve backup) (#1204)
* Namespace::destroy: add parameter to perform soft delete (preserve backup)

* make sure that log statement won't panic
2024-03-13 11:14:45 +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
b9ab41c485 ignore legacy auth when new auth is present (#1192) 2024-03-13 06:30:53 +00:00