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

chore/sqlite to enginev3 #3538

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

chore/sqlite to enginev3 #3538

wants to merge 4 commits into from

Conversation

kevinslin
Copy link
Member

@kevinslin kevinslin commented Sep 18, 2022

chore: enable sqlite for enginev3

  • update log levels so that detailed logs are written to diagnose testing issues
  • fix issue in engine.init where error is always returned
  • more detailed log messages

NOTE: the sqlite test suite doesn't work in ci which is why its skipped. currently testing is done locally
NOTE2: @tma66 - do we never initialize the FileStore for enginev3?

@kevinslin kevinslin marked this pull request as ready for review September 18, 2022 18:09
@kevinslin kevinslin requested a review from tma66 September 18, 2022 18:09
let errors: IDendronError[] = [];
let notesFname: NotePropsByFnameDict = {};
const start = process.hrtime();
const enableSQLITE =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DendronEngineV3 shouldn't be aware of anything related to SQLite - it should only know about the IDataStore interface, otherwise we're losing the benefits we gained by creating those interfaces. We need to pull all init logic out of this class/file.

Copy link
Contributor

@hikchoi hikchoi Sep 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if a user has the SQLite setting flipped in their configs and is using the web extension? wouldn't it cause problem at this point?

update: disregard. web implements a separate engine at this point. though this should probably move elsewhere like Jonathan mentioned to account for the eventual engine convergence.

@tma66
Copy link
Contributor

tma66 commented Sep 19, 2022

FileStore

FileStore is never used. But kept there for backwards compatibility until we clean it up

Copy link
Contributor

@hikchoi hikchoi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment about the init process that @jonathanyeung

if I'm understanding it correctly, sqlite backend wouldn't work currently with the web extension unless we make it work in memory and in the browser. So I think it makes sense that this is tied to FileStorage for the time being.

@kevinslin kevinslin force-pushed the chore/sqlite-to-enginev3 branch from bf73fe4 to 69dac75 Compare September 28, 2022 02:47
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

Successfully merging this pull request may close these issues.

5 participants