* refactor: Loro import function should return LoroEncodeError
- Change return type
- Add support for handling potential errors:
- Invalid or non-existent frontiers
- Exporting old snapshot format from trimmed snapshot doc
- Improve compatibility with trimmed docs
* fix: add tests and fix a few places that need to return err
* refactor!: change how we encode list state for fast-snapshot
* perf: speedup tree decode
* test: add movable list state snapshot test
* chore: add state encoding overhead test
* fix: error about invalid tree node creation
* chore: update example
---------
Co-authored-by: Leon Zhao <leeeon233@gmail.com>
* 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>
* test: test failed if use non-cached diff calc
* fix: tree diff calc retreat cache current vv
* fix: better tree cache current vv
---------
Co-authored-by: Zixuan Chen <remch183@outlook.com>
* refactor: add detached editing config and prepare the architecture for editing detached doc
* feat: subscribe for peer id change
* fix: undo after checkout & add tests for detached editing
* test: add fuzzer for detached editing
* feat: expose detached editing configure to wasm
* test: add wasm test for detached editing
* test: add no event test
* fix: should not emit event when exporting gc snapshot
* fix: not emitting events when exporting state only snapshot
* fix: type error
* test: a checkout event err
* fix: tree undo convert moving to creating should use new target tree id
---------
Co-authored-by: Zixuan Chen <remch183@outlook.com>
* 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
- Add ContainerDeleted error variant to LoroError
- Implement is_deleted() method for container handlers
- Check for deleted containers before applying operations
- Add dead_containers_cache to DocState to track deleted containers
- Update apply_diff to optionally clear dead container cache
- Add tests for handling operations on deleted containers
- Implement checkout to reset container deleted cache
- Minor code cleanup and typo fixes
* 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>
* 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
* 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
* 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>
* 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
* 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
* 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>
* 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
* refactor: use kv in state
* refactor: do not load the state into the inner fxhashmap if not needed
* refactor: calc offset without unsafe code
* style: replace unsafe code