0
0
mirror of https://github.com/tursodatabase/libsql.git synced 2025-07-05 04:53:39 +00:00
Commit Graph

58 Commits

Author SHA1 Message Date
8f6df203d7 sqld: prevent embedded replica to sync schema db 2024-09-19 13:48:43 -04:00
379fe7a2a3 Only add to last_frames_synced if frames did change.
Fixes an issue where a returned Replicated#frames_synced will
continuously increment based off the replicator.frames_synced() even if
no new frames have synced.
2024-09-09 17:38:04 -07:00
78abfe963e add support for basic auth for admin api 2024-09-03 09:01:42 +02:00
2b2574886a fmt 2024-08-29 11:57:17 +02:00
3bdf15c97c test embedded replication auth 2024-08-29 11:55:36 +02:00
2cf34946e7 tests: Add checks for max_write_replication_index
Signed-off-by: Piotr Jastrzebski <piotr@chiselstrike.com>
2024-08-13 22:30:10 +02:00
8c7a9bfb25 fix frames_synced 2024-08-01 17:15:05 -07:00
1dd2cc9ce9 moved to frames_synced 2024-08-01 15:16:42 -07:00
c77bbc7511 improve test 2024-08-01 15:16:42 -07:00
491f8f1153 fix sentinal file 2024-08-01 15:16:42 -07:00
844548ef32 add sential restart test 2024-08-01 15:16:42 -07:00
89dcb74be6 libsql: provide more return info for sync 2024-08-01 15:16:42 -07:00
a69b6772c2 server: add replica frame counter test check () 2024-07-10 10:03:10 +00:00
5d6e743403 libsql: add stream test () 2024-06-07 13:57:35 +00:00
505b21f536 Fix sync ()
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
958f5613cc libsql: fix embedded replica multiple txn ()
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 
2024-04-05 20:44:31 +00:00
724f6db925 libsql: fix malformed db and add test ()
* 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
5ece28f4fe gid tag token claim () 2024-03-11 16:14:52 +00:00
998d330428 extend test timeout () 2024-03-09 11:39:39 +00:00
405f605705 libsql: prevent database overwrite misuse ()
Closes 
2024-03-07 11:59:46 +00:00
4e0ce557a8 libsql: Rename periodic_sync to sync_interval ()
Rename the configuration option for periodic sync to `sync_interval` to
align with what we're doing with the rest of the SDKs.
2024-03-05 19:05:46 +00:00
1826582133 Embedded replicas encryption test ()
* Embedded replicas encryption test

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

* Fix encryption embedded replica test

* ci: add encryption tests

* add clean cipher build dir

---------

Signed-off-by: Piotr Jastrzebski <piotr@chiselstrike.com>
Co-authored-by: Lucio Franco <luciofranco14@gmail.com>
2024-03-04 16:09:02 +00:00
aeb32c299b libsql: add embedded replica freeze mode () 2024-02-07 18:07:41 +00:00
c18caa49e6 libsql: add periodic background sync ()
This adds a new periodic sync configuration item to the `Builder` that
will allow users to set a duration at which they want the background
sync to sync.
2024-02-07 08:39:06 +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
45b609c163 server: add embedded replica usage stats ()
* server: add embedded replica usage stats

* add test for embedded replica stats
2024-01-26 09:03:26 +00:00
975646e034 libsql: add local sync write delegation ()
* libsql: add local sync write delegation

* add additional query check to local sync test
2024-01-24 20:39:04 +00:00
0c93c5f11a Merge pull request from Horusiath/libsql-cursor-new-api
Libsql client: introduce async row fetcher
2024-01-17 10:31:45 +00:00
da21747012 treewide: huge un-featurization
The passphrase parameter is now unconditional, we just don't use it
if not applicable.
2024-01-16 16:44:39 +01:00
fc819a7fd4 embedded_replica/tests: same 2024-01-16 16:44:39 +01:00
733b497f87 replaced MappedRows with row->async_stream conversion 2024-01-16 08:23:08 +01:00
4f1e3c40fc reduced iteration count for replication test 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
5971b9894b Merge pull request from tursodatabase/fix-blocking-builder-write-proxy
Fix blocking ResultBuilder in WriteProxy
2024-01-03 09:58:10 +00:00
a910b34d27 add test 2024-01-03 10:47:36 +01:00
70ea955b68 fix bincode deserialize error 2024-01-02 13:20:40 +01:00
16c20fbdc6 test embedded replica proxy query returning value 2024-01-02 13:20:40 +01:00
cffd595e1d libsql: add read your writes support 2023-12-18 14:38:58 -05:00
e58c294e70 fix test leaving stray directory 2023-12-01 11:09:40 +01:00
23c2cbd4ce sqld: Add fault and http response metrics 2023-11-28 16:37:03 -05:00
f19b97caba fmt 2023-11-26 13:57:23 +01:00
bfc21223e7 test sync embedded replica with snapshots 2023-11-26 13:57:21 +01:00
bc1b16d5b9 fmt 2023-11-25 14:36:31 +01:00
51afddeabe test embedded replica don't resync from scratch on restart 2023-11-25 14:29:22 +01:00
e96be96299 fix embedded replica replication 2023-11-24 14:10:42 +01:00
536ce5095c rename(pkg): rename lib to libsql-server, keep bin as sqld 2023-11-17 08:43:05 -06:00
18e678bdb0 run cargo fmt 2023-11-13 19:32:11 +01:00
9aad7c025d test embedded replica reset. 2023-11-13 19:31:40 +01:00
83e5af2813 add xtask test, fix metrics tests 2023-11-09 10:56:44 -05:00
e8b97c689f fix sim tests xarg 2023-10-31 09:22:30 -04:00