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

New note lost after creation due to connection problem #82

Open
casutherland opened this issue Mar 11, 2019 · 6 comments
Open

New note lost after creation due to connection problem #82

casutherland opened this issue Mar 11, 2019 · 6 comments
Labels

Comments

@casutherland
Copy link

After creating a new note, there was apparently an internet connection issue and the note was never saved, locally or remote. Complete data loss.

Perhaps, we need to visit the local temporary persistence (store and forward) mechanism, in order to further reduce data loss in the event of a network disconnection?

@sobjornstad
Copy link

Just want to say I've experienced similar issues where sncli locks up when I save and exit my editor, and the content is lost. I've had to start writing out a backup copy before leaving my editor if I've made major changes. I would like to see sncli place the temporary file in a location where it will be saved if anything untoward happens.

@samuelallan72
Copy link

@sobjornstad

I would like to see sncli place the temporary file in a location where it will be saved if anything untoward happens.

The temporary file location is customizable with the cfg_tempdir option, so you can set it to a persistent location if you like. By default it is /tmp/, so if sncli has crashed, you can still recover the note (unless the OS has rebooted).

@samuelallan72
Copy link

...although it probably would be good to investigate when these tempfiles are deleted by sncli - it would be good to have them around for longer.

@sobjornstad
Copy link

Hmm, I seem to remember looking for it in /tmp and not finding it, but the last time I tried was a while ago. I'll take a closer look if it happens again.

@samuelallan72 samuelallan72 self-assigned this Jul 22, 2019
@samuelallan72
Copy link

I'm treating this as a high priority bug now. Data loss is no joke and this has affected enough people now. Obviously it is possible for the temporary file to be removed before a note is successfully saved in sncli's database or synced. I'll aim to look into it when I have time this week. If anyone else can see where the issues are and would like to open a WIP pull request or comment here, that would be appreciated. :)

@casutherland
Copy link
Author

Thanks. Running the branch PR #90 locally now, and already appreciating the increased reliability.

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

No branches or pull requests

3 participants