0
0
mirror of https://github.com/tursodatabase/libsql.git synced 2025-08-14 21:12:56 +00:00
Commit Graph

31 Commits

Author SHA1 Message Date
ad hoc
ded615ba53 fmt 2023-12-21 18:38:44 +01:00
ad hoc
93fc274648 use WrapWal for bottomless wal 2023-12-21 17:54:52 +01:00
Piotr Sarna
51de23b04b namespace: add bottomless checks in exists()
Even if the namespace doesn't exist locally, it might have a functional
backup.
2023-12-19 09:55:02 +01:00
ad hoc
0e025264b2 fix missing commit frame on local_client inject from snapshot 2023-12-13 13:18:07 +01:00
ad hoc
2167bed5e8 Merge pull request #776 from tursodatabase/prevent-checkpoint-on-close
prevent checkpoint on WAL close for InhibitCheckpointWal
2023-12-12 19:20:08 +00:00
ad hoc
3286992d35 prevent checkpoint on WAL close for InhibitCheckpointWal 2023-12-11 16:04:28 +01:00
Avinash Sajjanshetty
35e351471c Trim env keys and set to None if empty 2023-12-07 15:37:57 +05:30
Bartosz Sypytkowski
e4ded4f64f bottomless db snapshot: add more logging 2023-12-06 20:13:59 +09:00
ad hoc
ae9daa8b74 Use NonZeroU32 for frame_no and page_no 2023-12-05 09:20:44 +01:00
Lucio Franco
0197fd4154 Apply suggestions from code review
Co-authored-by: ad hoc <postma.marin@protonmail.com>
2023-12-01 09:00:10 -05:00
Lucio Franco
29bb970559 sqld: add in process s3 for bottomless tests
This adds in process mock s3 backend via the `s3s` crate. This allows us
to run tests without requiring a user run `minio` or hook up their real
aws account.
2023-11-30 17:42:01 -05:00
ad hoc
85279bdaf3 Merge pull request #517 from tursodatabase/wal-hook-v2
WallHook v2
2023-11-30 10:46:51 +00:00
ad hoc
05f6d47643 make pager's wal a pointer 2023-11-30 11:26:44 +01:00
ad hoc
e1a912c3c9 post-rebase fixes 2023-11-30 11:25:49 +01:00
ad hoc
ff53bcbc57 rename libsql_create_wal to libsql_wal_manager 2023-11-30 11:25:22 +01:00
ad hoc
4c982346fb remove Deref impl for BottomlessWal 2023-11-30 11:24:52 +01:00
ad hoc
ba3721368c remove bottoless legacy WAL code 2023-11-30 11:24:49 +01:00
ad hoc
320855c1f4 introduce BottomlessWal 2023-11-30 11:24:49 +01:00
ad hoc
ad01831821 make all crates depend on libsql-sys 2023-11-30 11:24:49 +01:00
Bartosz Sypytkowski
436dc9e9b8 bottomless shutdown: don't drop channel used by completion notifiers 2023-11-30 15:45:26 +09:00
Bartosz Sypytkowski
1475e9fe4b bottomless shutdown: drop flush trigger to complete complete WAL copier loop 2023-11-29 20:30:32 +09:00
Bartosz Sypytkowski
ef00da6739 bottomless: add method to wait for all background tasks to complete 2023-11-29 20:12:45 +09:00
Piotr Sarna
0c631155c7 bottomless/backup: do not cache WAL file descriptor
... because we end up reading stale data. The WAL file is recreated
after a TRUNCATE-level checkpoint and a new one is open, while we keep
reading from the old one, kept alive by the descriptor.

Fixes #598
2023-11-14 13:07:32 +01:00
Piotr Sarna
6ac769eb48 bottomless: make WAL checksums work across matching endianness
This is a partial fix to #598 - it makes the checksumming
work as long as it's produced and checked on an arch with matching
endianness. Most of modern machines, including the ones we run on
our platform, CI, and home devices are just little endian anyway.
The proper fix is to also store the checksum computation endianness
in our .meta file, just like SQLite stores it in the WAL header,
but that's not implemented yet.

Tested locally.
2023-11-14 11:24:39 +01:00
Piotr Sarna
4a71b2072a bottomless-cli: add restoring from a directory
Convenience function for manual restoration.
2023-11-09 12:17:15 +01:00
Avinash Sajjanshetty
3aa0955768 Make s3 retry op configurable and set default to 10 2023-10-31 14:50:08 +05:30
Piotr Sarna
acda80301a bottomless: switch to zstd as default
Gzip does not perform well on data in form of libSQL 4KiB pages,
and zstd performed uniformly better in all test cases I covered
locally (and not worse in case of random data with super high entropy).
2023-10-18 11:17:11 +02:00
Piotr Sarna
6f96daa955 bottomless: actually, add zstd
During stress tests, xz turned out to spontaneously fail to compress,
same with bzip2. All compression algos are supported by separate
crates, so these were simply ruled out.
Zstd proved to be:
 - fast
 - correct
 - more than acceptable on compression ratio
2023-10-18 11:08:51 +02:00
Piotr Sarna
5efb42b6fe fixup: Decoder should be used instead of Encoder in read.rs 2023-10-18 10:21:39 +02:00
Piotr Sarna
0a44f6aec9 bottomless: add xz compression option
Transplanted from https://github.com/libsql/sqld/pull/780
2023-10-18 10:21:39 +02:00
ad hoc
71ca43a7b6 make sqld compile 2023-10-17 17:41:26 +02:00