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

Improve saving and noting changes workflow #60

Open
gterzian opened this issue Nov 27, 2023 · 1 comment
Open

Improve saving and noting changes workflow #60

gterzian opened this issue Nov 27, 2023 · 1 comment

Comments

@gterzian
Copy link
Collaborator

See discussion at #58 (comment)

The idea is to move the concept of last_heads: Vec<ChangeHash>, currently one per document, to a "per pending save per document" one, by moving it to DocState::Sync and DocState::PendingRemoval.

Processing would have happen at two places:

  1. Inside note_changes, which would use the data found on the doc state instead of self.last_heads(this would remove the read lock by the way).

  2. Inside save_document, which would use the last (fut, last_heads) pair to compute the next one.

@gterzian
Copy link
Collaborator Author

Not sure if the above would resolve what you meant as a potential data loss @alexjg

Should one perhaps rather keep adding saves for "longer" parts of the history that would include history for still pending saves, in the case previous saves are still pending?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant