Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assemble runtime crdt state #408

Merged
merged 18 commits into from
Apr 28, 2023
Merged

assemble runtime crdt state #408

merged 18 commits into from
Apr 28, 2023

Conversation

darkskygit
Copy link
Member

@darkskygit darkskygit commented Apr 25, 2023

In this pr, I implemented the assembly of the crdt item into doc to provide state items that allows the operation of the list/map/text function.

Since store may be used across threads, it means that it needs to be thread-safe.

@vercel
Copy link

vercel bot commented Apr 25, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
octobase ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 28, 2023 11:16am

@darkskygit darkskygit temporarily deployed to development April 25, 2023 15:40 — with GitHub Actions Inactive
@darkskygit darkskygit temporarily deployed to development April 25, 2023 15:40 — with GitHub Actions Inactive
@darkskygit darkskygit temporarily deployed to development April 25, 2023 15:40 — with GitHub Actions Inactive
@darkskygit darkskygit changed the title port crdt operations assemble runtime crdt state & port crdt operations Apr 25, 2023
@codecov
Copy link

codecov bot commented Apr 25, 2023

Codecov Report

Patch coverage: 64.19% and project coverage change: -0.08 ⚠️

Comparison is base (532c9be) 65.42% compared to head (c6d8bd5) 65.34%.

❗ Current head c6d8bd5 differs from pull request most recent head b08ef86. Consider uploading reports for the commit b08ef86 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #408      +/-   ##
==========================================
- Coverage   65.42%   65.34%   -0.08%     
==========================================
  Files         125      128       +3     
  Lines       12253    12750     +497     
==========================================
+ Hits         8016     8332     +316     
- Misses       4237     4418     +181     
Impacted Files Coverage Δ
libs/jwst-codec/src/doc/doc.rs 0.00% <0.00%> (ø)
libs/jwst-codec/src/doc/codec/refs.rs 56.55% <56.55%> (ø)
libs/jwst-codec/src/doc/codec/content.rs 47.54% <64.28%> (ø)
libs/jwst-codec/src/lib.rs 40.32% <75.00%> (+0.61%) ⬆️
libs/jwst-codec/src/doc/store.rs 80.00% <80.00%> (ø)
libs/jwst-codec/src/doc/codec/any.rs 52.63% <100.00%> (ø)
libs/jwst-codec/src/doc/codec/id.rs 100.00% <100.00%> (ø)
libs/jwst-codec/src/doc/codec/item.rs 100.00% <100.00%> (ø)
libs/jwst-codec/src/doc/codec/update.rs 100.00% <100.00%> (ø)

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Brooooooklyn Brooooooklyn temporarily deployed to development April 26, 2023 07:48 — with GitHub Actions Inactive
@Brooooooklyn Brooooooklyn temporarily deployed to development April 26, 2023 07:48 — with GitHub Actions Inactive
@Brooooooklyn Brooooooklyn temporarily deployed to development April 26, 2023 07:48 — with GitHub Actions Inactive
@darkskygit darkskygit temporarily deployed to development April 26, 2023 11:35 — with GitHub Actions Inactive
@darkskygit darkskygit temporarily deployed to development April 26, 2023 11:35 — with GitHub Actions Inactive
@darkskygit darkskygit temporarily deployed to development April 26, 2023 11:35 — with GitHub Actions Inactive
@darkskygit darkskygit temporarily deployed to development April 26, 2023 21:06 — with GitHub Actions Inactive
@darkskygit darkskygit temporarily deployed to development April 26, 2023 21:06 — with GitHub Actions Inactive
@darkskygit darkskygit temporarily deployed to development April 26, 2023 21:06 — with GitHub Actions Inactive
@darkskygit darkskygit temporarily deployed to development April 27, 2023 10:16 — with GitHub Actions Inactive
@darkskygit darkskygit temporarily deployed to development April 27, 2023 10:16 — with GitHub Actions Inactive
@darkskygit darkskygit temporarily deployed to development April 27, 2023 10:16 — with GitHub Actions Inactive
@darkskygit darkskygit temporarily deployed to development April 27, 2023 13:57 — with GitHub Actions Inactive
@darkskygit darkskygit temporarily deployed to development April 27, 2023 13:57 — with GitHub Actions Inactive
@darkskygit darkskygit temporarily deployed to development April 28, 2023 02:53 — with GitHub Actions Inactive
@darkskygit darkskygit temporarily deployed to development April 28, 2023 02:53 — with GitHub Actions Inactive
@darkskygit darkskygit temporarily deployed to development April 28, 2023 02:53 — with GitHub Actions Inactive
libs/jwst-codec/src/doc/codec/refs.rs Fixed Show fixed Hide fixed
libs/jwst-codec/src/doc/codec/refs.rs Fixed Show fixed Hide fixed
libs/jwst-codec/src/doc/mod.rs Fixed Show fixed Hide fixed
libs/jwst-codec/src/doc/doc.rs Fixed Show fixed Hide fixed
libs/jwst-codec/src/doc/doc.rs Fixed Show fixed Hide fixed
libs/jwst-codec/src/doc/store.rs Fixed Show fixed Hide fixed
libs/jwst-codec/src/doc/codec/refs.rs Fixed Show fixed Hide fixed
libs/jwst-codec/src/doc/doc.rs Fixed Show fixed Hide fixed
libs/jwst-codec/src/doc/doc.rs Fixed Show fixed Hide fixed
libs/jwst-codec/src/doc/codec/refs.rs Fixed Show fixed Hide fixed
@darkskygit darkskygit temporarily deployed to development April 28, 2023 10:10 — with GitHub Actions Inactive
@darkskygit darkskygit temporarily deployed to development April 28, 2023 10:10 — with GitHub Actions Inactive
@darkskygit darkskygit temporarily deployed to development April 28, 2023 10:10 — with GitHub Actions Inactive
@darkskygit darkskygit changed the title assemble runtime crdt state & port crdt operations assemble runtime crdt state Apr 28, 2023
@darkskygit darkskygit marked this pull request as ready for review April 28, 2023 10:12
@darkskygit darkskygit merged commit 154546a into master Apr 28, 2023
@darkskygit darkskygit deleted the feat/ydoc_instance branch April 28, 2023 10:13
Comment on lines +64 to +71
pub fn new() -> Self {
Self {
client_id: rand::random(),
guid: nanoid!(),
// share: HashMap::new(),
store: DocStore::new(),
}
}

Check warning

Code scanning / clippy

you should consider adding a `Default` implementation for `Doc`

you should consider adding a `Default` implementation for `Doc`
for client_id in client_ids {
let refs = items.get(&client_id).unwrap();
let mut iterator = refs.iter();
while let Some(item) = iterator.next() {

Check warning

Code scanning / clippy

this loop could be written as a `for` loop

this loop could be written as a `for` loop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

assemble runtime crdt state
2 participants