Commit graph

1691 commits

Author SHA1 Message Date
Zixuan Chen
38d1c279d9
feat: add new export api to wasm 2024-09-12 22:16:55 +08:00
Zixuan Chen
9040747620
fix: ensure all alive containers are encoded in doc state snapshot 2024-09-12 20:53:50 +08:00
Zixuan Chen
a9d4de7a18
Test: Add fuzzing tests for gc mode correctly & fix several failed cases (#461)
* test: fuzz gc correctly

* fix: lots of gc snapshot issues

* fix: vv to frontiers

* test: add an arbtest for gc fuzzing tests

* test: fix a few test issues

* fix: apply diff of a dangling container that was deleted before trimmed version
2024-09-12 20:07:57 +08:00
Zixuan Chen
f39b34e854
Merge pull request #449 from loro-dev/zxch3n/loro-912-opt-export-updates-block-encode
Optimize block encoding schema & new encoding schema for updates
2024-09-12 19:45:27 +08:00
leeeon233
5450e511d0
chore: merge gc 2024-09-12 17:24:40 +08:00
leeeon233
3ecbc34b26
Merge branch 'feat-gc' into zxch3n/loro-912-opt-export-updates-block-encode 2024-09-12 17:13:06 +08:00
Zixuan Chen
db1111cf83
test: fix gc fuzz preprocess 2024-09-11 23:56:37 +08:00
Zixuan Chen
81c9f3aacc
Merge branch 'test-add-gc-fuzz-test' into feat-gc 2024-09-11 23:36:16 +08:00
Zixuan Chen
88f9e5fa45
test: add fuzzing tests for gc snapshot 2024-09-11 23:34:05 +08:00
Zixuan Chen
99c012c20a
fix: raise error if importing updates that dep on trimmed history (#457)
* fix: raise error if importing updates that dep on trimmed history

* test: check event correctness
2024-09-11 22:54:39 +08:00
Zixuan Chen
21e3ffea45
perf: refine state fast snapshot & fix a few tree event issues (#459)
* perf: refine state fast snapshot

* fix: tree apply diff err

* fix: get child index

* fix: use better tree event
2024-09-11 22:54:14 +08:00
Leon Zhao
dfc99c1746
feat: block encode header (#458)
* bk

* feat: encode header

* chore: use columnar 0.3.9

* fix: not need encode last lamport and length

* chore: cargo fix

* fix: print

* bk

* chore: columnar 0.3.10
2024-09-11 22:53:10 +08:00
Leon Zhao
f7bd2aefff
feat: do not compress if larger after compressing (#455)
* feat: do not compress if larger after compressing

* test: add related tests and ensure coverage

---------

Co-authored-by: Zixuan Chen <remch183@outlook.com>
2024-09-11 18:13:41 +08:00
Zixuan Chen
255a7bd9e6
chore: add deprecated warning for old export methods 2024-09-11 14:25:30 +08:00
Zixuan Chen
dfe5b15a83
test: add loro value encode size check 2024-09-11 12:50:52 +08:00
Zixuan Chen
69ef0ac8c2
refactor: rename fractional index config function
and fix a few timestmap err
2024-09-11 11:16:31 +08:00
Zixuan Chen
d7778f15fd
test: fix a few outdated test 2024-09-11 11:05:42 +08:00
Zixuan Chen
4a27a0645f
Merge branch 'dev' into feat-gc 2024-09-11 10:54:29 +08:00
Zixuan Chen
71e46f65f1
perf: export block directly for updates
It can reduce the overhead for small updates
2024-09-10 13:09:45 +08:00
Leon Zhao
07671ea9fd
feat: add old parent and old index in tree diff (#452)
* feat: add old parent in tree diff

* chore: enable ci

* feat: add old_index to tree diff

* fix: new fractional index config

* fix: cargo fix

* fix: add FractionalIndexNotEnabled error

* fix: move config to tree state

* fix: error string

---------

Co-authored-by: Zixuan Chen <remch183@outlook.com>
2024-09-09 16:16:02 +08:00
Zixuan Chen
ab6ee76b1e
style: refine a few impl (#454)
Some checks failed
Release WASM / Release (push) Has been cancelled
Test All / build (push) Has been cancelled
2024-09-09 15:58:00 +08:00
Zixuan Chen
7be915e87d
chore: bump rust crates version
Some checks failed
Release WASM / Release (push) Has been cancelled
Test All / build (push) Has been cancelled
2024-09-07 20:01:33 +08:00
github-actions[bot]
243708943c
chore: version packages (#451)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-07 19:44:32 +08:00
Zixuan Chen
46e21fccc7
fix: two tree move (inside the same parent) issues (#450)
Some checks are pending
Release WASM / Release (push) Waiting to run
Test All / build (push) Waiting to run
* fix: two tree move (inside the same parent) issues

* chore: add release note
2024-09-07 16:49:28 +08:00
Zixuan Chen
1c4d7e2182
chore: add some debug log 2024-09-06 22:57:19 +08:00
Zixuan Chen
3d2d9d9c18
refactor: optimize block encoder 2024-09-06 16:26:50 +08:00
Zixuan Chen
00a25510f1
refactor!: use timestamp in seconds by default (#448) 2024-09-05 22:21:18 +08:00
Zixuan Chen
dd6bb10fff
Refactor(wasm) rename Loro to LoroDoc (#443)
* chore: reduce wasm size

* refactor(wasm): rename Loro to LoroDoc
2024-09-05 20:27:31 +08:00
Zixuan Chen
c04da30572
fix: avoid import issue on rich text doc
by avoid splitting doc on a version that splits the stylestart and styleend
2024-09-05 17:48:59 +08:00
Zixuan Chen
6e8048bc28
test: add test for export snapshot on gc doc 2024-09-05 16:50:41 +08:00
Zixuan Chen
e9be422046
fix: handle on new container correctly
when using diff calc for unknown span
2024-09-05 16:26:00 +08:00
Leon Zhao
cb134fc7c7
feat: add with fractional index config (#442)
* feat: add `with_fractional_index` config

* fix: share config state
2024-09-05 16:03:47 +08:00
github-actions[bot]
622c881605
chore: version packages (#447)
Some checks failed
Release WASM / Release (push) Has been cancelled
Test All / build (push) Has been cancelled
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-05 14:31:14 +08:00
Zixuan Chen
e7bf12cc14
(GC) Checkout on text/list that needs to retrieve content from the trimmed state (#446)
* feat: export gc snapshot without latest state when ops len is small

* test: add a test for time tracker usage

* chore: add gc snapshot bench

* chore: simplify

* test: record timestamp for time tracker

* fix: checkout to a version that needs to use gc state

* refactor: make list internal event more reasonable

* fix: checkout list/movable list on gc doc
2024-09-05 14:30:22 +08:00
Zixuan Chen
dce00abd8a
Fix using loro in cloudflare worker (#441)
* fix: try fix generated wasm bundler

* fix: loro-quill example

 and fix bundler patch issue

* chore: add release info
2024-09-05 13:10:27 +08:00
Zixuan Chen
68ffd31ba0
Feat when exporting gc snapshot with short history, don't encode the latest state (#445)
* feat: export gc snapshot without latest state when ops len is small

* test: add a test for time tracker usage

* chore: add gc snapshot bench

* chore: simplify

* test: record timestamp for time tracker
2024-09-04 21:00:17 +08:00
Zixuan Chen
3d5a5da425
feat: remove dropped containers on exported gc snapshot 2024-09-04 19:52:53 +08:00
Zixuan Chen
4c325ab87c
Merge branch 'dev' into feat-gc 2024-09-03 21:21:14 +08:00
Zixuan Chen
08d53cae93
feat: subscribe for local updates (#444) 2024-09-03 14:04:43 +08:00
Zixuan Chen
64e5d30da8
chore: reduce wasm size 2024-09-02 00:30:00 +08:00
Zixuan Chen
cdb7498e90
chore: setup tracing feature only on loro-wasm 2024-08-30 20:58:18 +08:00
Leon Zhao
c1620fdb37
feat: memkv export import all (#422)
* feat: sstable

* fix: add magic number version

* feat: new mem kv store based sstable

* feat: binary_search

* fix: sstable iter scan

* fix: new mem kv

* feat: add cache for sstable

* fix: encode schema comment

* fix: sstable iter scan

* chore: clean

* fix: export all

* fix: sstable scan bound

* fix: sstable iter scan next==prev

* fix: merge iter next_back

* fix: mem kv export

* chore: clean

* fix: prev to key

* fix: prev find block

* fix: get prev block idx

* refactor: kv store

* fix: checksum when import

* fix: meta first last key

* Revert "fix: meta first last key"

This reverts commit a069c1ed37.

* fix: skip empty iter

* fix: remove key from large block

* chore: comment

* feat: compress block

* fix: remove key in large block

* chore: const

* doc: intro sstable encode

* test: add kv store fuzz

* style: format file

* feat: add fuzz to kv store (#428)

* fix: kv fuzzer

* fix: debug

* bk

* fix: block iter next back

* fix: block prev iter left = next idx

* feat: move kv store a crate

* fix: remove value len from normal block

* doc: sstable format

* test: add more test

* test: add test

* feat: new merge iter

* chore: revert

* fix: rename next back

* fix: rename mem sstable

* fix: rename to mem

* fix: use Bytes as key

* fix: use simple merge iter

* feat: compress option

* fix: remove empty iter

* style: refine some impl details

* fix: large block compress

* feat: use write read for encode

* doc: refine doc

* fix: simplify the first chunk

* feat: import many times

* refactor: refine styles

* test: fuzz merge iter

* fix: rename peek_xxx()

* fix: better sstable iter inner

* fix: use mem kv store

* pref: mem kv store

* perf: export mem kv

* chore: clean

---------

Co-authored-by: Zixuan Chen <remch183@outlook.com>
2024-08-30 11:44:34 +08:00
Zixuan Chen
94252102b3
chore: update categories
Some checks failed
Release WASM / Release (push) Has been cancelled
Test All / build (push) Has been cancelled
2024-08-29 23:09:45 +08:00
Zixuan Chen
4fa34a318a
chore: rm keywords 2024-08-29 23:07:47 +08:00
Zixuan Chen
cf6489b320
chore: rm keywords 2024-08-29 23:06:23 +08:00
Zixuan Chen
543bbe9226
chore: rm keyword 2024-08-29 23:03:45 +08:00
Zixuan Chen
a38cf178d1
chore: bump rust crates version 2024-08-29 23:02:03 +08:00
Zixuan Chen
0cc90937cd
fix: insert change split error 2024-08-29 22:18:11 +08:00
Leon Zhao
c1f0a40f4b
feat: movable list tree gc (#439)
* feat: movable list tree gc

* fix: record value in movable history when gc

* fix: movable list gc

* fix: remove value from pos

* refactor: tree init

* test: add tree gc checkout test
2024-08-29 09:53:32 +08:00
Zixuan Chen
60036bc39c
Merge branch 'main' into dev 2024-08-28 23:33:44 +08:00