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

Make a more robust handler for save errors on the server #192

Open
inmysocks opened this issue Oct 31, 2022 · 0 comments
Open

Make a more robust handler for save errors on the server #192

inmysocks opened this issue Oct 31, 2022 · 0 comments

Comments

@inmysocks
Copy link
Member

There are some very rare edge cases that could cause the server and browser to be out of sync. These problems are not unique to Bob, the core and its savers have the same potential issues. They are very rare so ignoring them is generally reasonable.

At the moment if a websocket message is received and acknowledged the server and browser assume that it was a success. There may be rare cases where there is an error saving or deleting a tiddler on the server and this isn't reflected in the browser.

The only thing that would currently detect and fix an error like this is updating the affected tiddler or restarting the server.

Bob currently uses tiddler hashes to detect if a tiddler has changed when receiving a save message, we could periodically compare these hashes for all of the synced tiddlers and if there is a mismatch attempt a fix and if that fails alert the user.

The biggest issue is determining priority when deciding if the browser or server version is correct. This gets more complex when there are multiple users, or multiple open browsers connected to the same wiki.

As a first step I am going to implement a way to check the in-browser hash against the server hash to see if they match without a resolution option other than exporting the html and seeing what tiddlers are different when you reload from the server.

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