zulip-desktop icon indicating copy to clipboard operation
zulip-desktop copied to clipboard

Migrate database to LevelDB.

Open kanishk98 opened this issue 5 years ago • 7 comments


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

kanishk98 avatar Aug 16 '19 09:08 kanishk98

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.

kanishk98 avatar Aug 16 '19 09:08 kanishk98

I think this PR's ready for review now. @priyank-p and @akashnimare please have a look at this whenever you find time. :)

kanishk98 avatar Aug 18 '19 16:08 kanishk98

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.

zulipbot avatar Nov 13 '19 09:11 zulipbot

@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 ?

manavmehta avatar Mar 30 '20 08:03 manavmehta

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.

kanishk98 avatar Apr 04 '20 17:04 kanishk98

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 avatar Apr 04 '20 17:04 kanishk98

@kanishk98 awesome. In case you and @akashnimare feel I should build upon this, I would surely appreciate your help! Thanks for showing up :)

manavmehta avatar Apr 04 '20 17:04 manavmehta