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(gatsby): upgrade from lmdb-store to lmdb #34576

Merged
merged 10 commits into from
Feb 15, 2022
Merged

Conversation

pieh
Copy link
Contributor

@pieh pieh commented Jan 24, 2022

Description

In practice this bumps our lmdb-store one major version (there was name change to just lmdb with version 2). And allow usage of clearKeptSync (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]

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jan 24, 2022
@pieh pieh added topic: data Relates to source-nodes, internal-data-bridge, and node creation and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Jan 24, 2022
@pieh pieh force-pushed the chore/upgrade/lmdb branch 2 times, most recently from 9d0a414 to 34d1fc5 Compare January 25, 2022 20:56
// 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.
Copy link
Contributor Author

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)

Copy link
Contributor Author

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Oooo good catch!

@pieh pieh marked this pull request as ready for review February 11, 2022 19:20
@pieh pieh added the topic: core Relates to Gatsby's core (e.g. page loading, reporter, state machine) label Feb 11, 2022
// 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.
Copy link
Contributor

Choose a reason for hiding this comment

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

Oooo good catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: merge on green Gatsbot will merge these PRs automatically when all tests passes topic: core Relates to Gatsby's core (e.g. page loading, reporter, state machine) topic: data Relates to source-nodes, internal-data-bridge, and node creation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants