Commit graph

193 commits

Author SHA1 Message Date
Zixuan Chen
5fc3458eb7
perf: use simplified internal string (#551)
Some checks are pending
Release WASM / Release (push) Waiting to run
Test All / build (push) Waiting to run
* perf: use simplified internal string

* fix: make internal string trait impl more stringish

* perf: reduce InternalString memory cost from 16 bytes to 8 bytes
on 64bit platform

* chore: fix warning

* perf: optimize drop

* test: add init large map example
2024-11-11 15:08:27 +08:00
Zixuan Chen
cc570d2b80
chore: bump Rust crates to v1.1.0 2024-11-09 23:35:17 +08:00
Zixuan Chen
778ca5452d
feat: allow users to query the changed containers in the target id range (#549)
* feat: allow users to query the changed containers in the target id range

* chore: add changeset note

* chore: update cargo toml

* test: add related tests and add a commit before get_changed_container_in
2024-11-09 21:00:07 +08:00
Zixuan Chen
9731e6ace2
chore: bump rust crates versions 2024-10-22 23:07:38 +08:00
Zixuan Chen
9650c52a30
chore: rm unused deps 2024-10-17 02:01:16 +08:00
Zixuan Chen
66b8a76fdf
test: add compatibility tests (#503) 2024-10-09 17:42:05 +08:00
Zixuan Chen
59efca6fe5
perf: optimize kv export_all by reusing encoded block (#501)
* perf: optimize kv export_all by reusing encoded block

* chore: fix warnings

* perf: reuse encoded block bytes

* perf: optimize encode/decode speed further

* chore: fix warning
2024-10-09 10:22:17 +08:00
Leon Zhao
4414053a82
feat: add FFI for Loro (#420)
* chore: init ffi

* feat: impl doc and LoroList

* feat: impl containers

* feat: unknown container

* feat: event ffi

* chore: clean

* feat: ffi undo manager

* chore: cargo fix

* chore: cargo fix

* fix: ffi value or container

* fix: ffi arc

* fix: is attached for movable list

* bk

* feat: all LoroDoc func

* feat: refine vv

* feat: ffi frontiers

* feat: ffi awareness

* fix: merge
2024-09-29 07:41:59 +08:00
Zixuan Chen
78aaa4080d
Fix tree cache checkout issue and add a few invariance checks (#479)
* test: test failed if use non-cached diff calc

* fix: tree diff calc retreat cache current vv

* feat(wasm): commit message & get pending ops length

* bk

* chore: add tree one doc fuzz

* fix: fix the problem and added a few checks

* chore: rm debugging code

* fix: encode snapshot when detached

---------

Co-authored-by: leeeon233 <leeeon233@gmail.com>
2024-09-25 20:50:10 +08:00
Zixuan Chen
d460346585
feat: jsonpath experimental support (#466)
* feat: jsonpath experimental support

* fix: add support for negative index unionindex and unionkey

* chore: export lorodoc in loro-js and fix a few tests related to map's entries order

* chore: fix type err
2024-09-19 19:22:39 +08:00
Zixuan Chen
2f38708a50
Fix a tree checkout issue on GcSnapshot (#464)
* test: a failed test case

* fix: tree checkout init err

* fix: export from

* chore: add cov

* fix: movable list undo/redo apply delta err

* refactor: refactor by o1-preview 🤯

* refactor: extract arguments

* test: add cov

* fix: use correct method to get was_alive for tree node

* fix: tree event was alive err

---------

Co-authored-by: Leon Zhao <leeeon233@gmail.com>
2024-09-17 00:19:29 +08:00
Zixuan Chen
c18cec15a9
fix: lazy load dag node 2024-09-13 18:39:44 +08:00
Zixuan Chen
f1374c3bd0
Merge branch 'main' into dev 2024-09-12 22:30:42 +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
88f9e5fa45
test: add fuzzing tests for gc snapshot 2024-09-11 23:34:05 +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
4a27a0645f
Merge branch 'dev' into feat-gc 2024-09-11 10:54:29 +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
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
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
4c325ab87c
Merge branch 'dev' into feat-gc 2024-09-03 21:21:14 +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
a38cf178d1
chore: bump rust crates version 2024-08-29 23:02:03 +08:00
Zixuan Chen
60036bc39c
Merge branch 'main' into dev 2024-08-28 23:33:44 +08:00
Zixuan Chen
a76143068a
Chore build err (#434)
* chore: rm needless fuzz code

* fix(wasm): build script fix

* chore: release info
2024-08-27 21:30:18 +08:00
Zixuan Chen
cfe8652415
feat: basic gc mode impl 2024-08-26 21:21:33 +08:00
Zixuan Chen
95bec549d7
feat: support commit message (#429)
* feat: support commit message

* test: refine test
2024-08-24 14:15:40 +08:00
Zixuan Chen
544a8ebfcc
test: add a multithread test case minify method 2024-08-20 01:41:44 +08:00
Zixuan Chen
c23e29ddb1
perf: replace md5 with xxhash for checksum 2024-08-17 23:32:09 +08:00
Zixuan Chen
6126906ec2
perf: make idlp to id much faster
by using binary search on top of .range
2024-08-17 21:16:44 +08:00
Zixuan Chen
de8f9e38aa
refactor: change store internal 2024-08-15 08:28:11 +08:00
Zixuan Chen
32687f61e8
chore: add rle vec 2024-08-13 11:47:57 +08:00
Zixuan Chen
0bac73b029
perf: optimize how to store fractional index in change block 2024-08-10 15:40:56 +08:00
Zixuan Chen
bdc8b4b908
fix: split large change when importing 2024-08-09 17:27:07 +08:00
Zixuan Chen
be191f32bd
chore: add method to monitor the memory usage 2024-08-09 14:31:33 +08:00
Zixuan Chen
7e7fe782b4
refactor: refine movable list internal event 2024-08-06 15:34:55 +08:00
Zixuan Chen
46000420e8
Merge main 2024-07-12 16:15:54 +08:00
Zixuan Chen
ec905635fd
chore: update fuzz config 2024-07-04 20:06:18 +08:00
Zixuan Chen
9047065843
Fix undo with checkout (#375)
* fix: should transform checkout event

* chore: update fuzz dep

* chore: add pos to error info

* fix: clear undo/redo stack when checkingout

* test: update fuzz dep

* test: a new failed test case

* fix: tree transform

* chore: fuzz

* chore: add log

* chore: add more logs

* fix: compose err

* chore: fuzz test dep

* test: a failed tree case

* fix: undo tree event

* fix: do not compare tree position in fuzz

* fix: fuzz rev

* test: a failed tree case

* fix: add tree compose

* chore: add comment

* chore: fuzz

* fix: test

* fix: tree transform

* fix: tree transform index

* fix: sort tree index

* chore: fuzz

* fix: undo/redo remote change effect compose

* bk

* fix: tree undo redo (#385)

* fix: event hint none

* chore: fuzz version

* ci: fuzz

* bk: weird err

* fix: type err

* fix: fractional index between

* fix: wasm counter feature

* test: a new failed case

* fix: recursively create child nodes

* fix: filter empty event

* bk

* bk

* fix: tree undo redo remap

* chore: clean

* bk

* fix: tree need remap first

* fix: tree undo effect

* fix: tree diff calc

* fix: tree fuzz check eq func

* fix: remove EventHint None

* chore: cargo fix

* fix: tree uncreate

* fix: fuzz tree assert only structure

* refactor: rename methods

* fix: movable tree apply delta

* fix: another movable list issue

* chore: fuzz only check 1 actor's history

---------

Co-authored-by: Leon Zhao <leeeon233@gmail.com>
2024-07-04 18:15:44 +08:00
Zixuan Chen
d6c8a632ad
Merge branch 'main' into zxch3n/container-store 2024-06-18 18:09:14 +08:00
Leon Zhao
0b3c6ba1d0
fix: merge 2024-06-13 15:11:29 +08:00
Leon Zhao
afac34755f
feat: implementing Counter and expose to js side (#384) 2024-06-13 14:43:19 +08:00
Zixuan Chen
e54da5d838
bk: container store encode/decode 2024-06-13 12:13:30 +08:00
Zixuan Chen
d71fee144d
bk: container store impl 2024-06-12 11:43:02 +08:00
Leon Zhao
2df2a52b05
feat: Stable JSON representation for history (#368)
---------

Co-authored-by: Zixuan Chen <remch183@outlook.com>
2024-06-07 13:18:30 +08:00
Zixuan Chen
ad9c3a79bd
Merge branch 'main' into zxch3n/loro-649 2024-06-04 20:59:36 +08:00
Zixuan Chen
54637a7b42
Publish v0.16.2 to crates.io (#374)
* chore: mark dev-utils not published

* chore: release rust crates

* chore: publish fi

* chore: pre publish fi

* chore: update lockfile

* test: change fuzz rev
2024-05-29 22:55:55 +08:00
Leon Zhao
cd04b27d65
fix: fuzz cache and counter feature (#373)
* fix: fuzz cache and counter feature

* fix: rev
2024-05-29 22:44:21 +08:00