y-crdt / yrs-persistence

Native persistence providers for Yrs CRDT
10 stars 4 forks source link

Update yrs to 0.19 #8

Closed rbtying closed 2 months ago

rbtying commented 2 months ago

Updates yrs to 0.19

Horusiath commented 2 months ago

I'll need to address some improvements here before releasing the next version.

Horusiath commented 2 months ago

@rbtying I've made upgrade in #9, but after running tests on macOS it looks like there are some issues about how rocksdb TransactionDB::open_default is initialised.

unsafe precondition(s) violated: ptr::copy_nonoverlapping requires that both pointer arguments are aligned and non-null and the specified memory ranges do not overlap
stack backtrace:
   0: rust_begin_unwind
             at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:652:5
   1: core::panicking::panic_nounwind_fmt::runtime
             at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/panicking.rs:110:18
   2: core::panicking::panic_nounwind_fmt
             at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/panicking.rs:120:5
   3: core::panicking::panic_nounwind
             at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/panicking.rs:220:5
   4: core::intrinsics::copy_nonoverlapping::precondition_check
             at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/ub_checks.rs:66:21
   5: core::intrinsics::copy_nonoverlapping
             at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/ub_checks.rs:73:17
   6: rocksdb::transactions::transaction_db::TransactionDB<T>::open_cf_descriptors_internal
             at /Users/bartoszsypytkowski/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rocksdb-0.22.0/src/transactions/transaction_db.rs:303:13
   7: rocksdb::transactions::transaction_db::TransactionDB<T>::open_cf
             at /Users/bartoszsypytkowski/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rocksdb-0.22.0/src/transactions/transaction_db.rs:200:9
   8: rocksdb::transactions::transaction_db::TransactionDB<T>::open
             at /Users/bartoszsypytkowski/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rocksdb-0.22.0/src/transactions/transaction_db.rs:179:9
   9: rocksdb::transactions::transaction_db::TransactionDB<T>::open_default
             at /Users/bartoszsypytkowski/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rocksdb-0.22.0/src/transactions/transaction_db.rs:170:9

I need to make sure if this problem only occurs in our case or is this some general issue that happens in recent Rust version for rocksdb crate.

rbtying commented 2 months ago

@Horusiath looks like a rocksdb issue?

https://github.com/rust-rocksdb/rust-rocksdb/issues/881