zulip-desktop
zulip-desktop copied to clipboard
Migrate database to LevelDB.
What's this PR do?
Changes database module used for maintaining settings.json
to leveldb
. Uses a node wrapper around it.
Any background context you want to provide?
We need to move database operations to one process to avoid app crashes (which used to happen earlier). LevelDB also uses locking and can therefore handle corner cases better than node-json-db
.
You have tested this PR on:
- [x] Windows
- [x] Linux/Ubuntu
- [ ] macOS
saved settings don't seem to reflect when the app loads again
Ah, silly mistake on my part - I was moving around DataStore
methods and forgot to run the loadSettings()
method on app load.
I'll fix this asap.
I think this PR's ready for review now. @priyank-p and @akashnimare please have a look at this whenever you find time. :)
Heads up @kanishk98, we just merged some commits that conflict with the changes your made in this pull request! You can review this repository's recent commits to see where the conflicts occur. Please rebase your feature branch against the upstream/master
branch and resolve your pull request's merge conflicts accordingly.
@akashnimare Are there only merge conflicts or there's something else as @kanishk98 says it's ready for review. Should I make a new PR based on this one ?
Hey @manavmehta, great to see some new faces around here! I'm a little free this weekend, so I'd be happy to rebase against a fresh fetch of master or I can walk you through any help you might need. @akashnimare let us know what works best for you.
I think this was a fairly involved PR, so if LevelDB still solves our database-level problems, it would be easier and quicker if I were to just update my PR according to master. I'm just trying to be cognizant of GSoC processes at the same time.
@kanishk98 awesome. In case you and @akashnimare feel I should build upon this, I would surely appreciate your help! Thanks for showing up :)