-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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(gatsby): upgrade from lmdb-store to lmdb #34576
Conversation
cbf00da
to
34d1fc5
Compare
9d0a414
to
34d1fc5
Compare
34d1fc5
to
9b010e6
Compare
// In `gatsby serve` case we might try to open it twice - once for engines | ||
// and second to get access to `SitePage` nodes (to power trailing slashes | ||
// redirect middleware). This ensure there is single instance within a process. | ||
// Using more instances seems to cause weird random errors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems new with lmdb@2
- we have trailing slashes in master and released generally and not seeing it there (with lmdb-store@1
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, and also to clarify - this module does already prevent opening multiple DBs. The problem with gatsby serve
that this module is used as-is and then it can be used in bundled graphql-engine, so just there are 2 separate instances of this module alive
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oooo good catch!
// In `gatsby serve` case we might try to open it twice - once for engines | ||
// and second to get access to `SitePage` nodes (to power trailing slashes | ||
// redirect middleware). This ensure there is single instance within a process. | ||
// Using more instances seems to cause weird random errors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oooo good catch!
Description
In practice this bumps our
lmdb-store
one major version (there was name change to justlmdb
with version 2). And allow usage ofclearKeptSync
(there is some internal use of that directly in lmdb@2 now, but this is cheap, so just to be on safe side, we still call it)Related Issues
[ch-45417]