Skip to content

fix(gatsby): use lmdb for resultHash cache so shared across workers#34925

Merged
gatsbybot merged 10 commits into
masterfrom
lmdb-resulthash-cache
Mar 11, 2022
Merged

fix(gatsby): use lmdb for resultHash cache so shared across workers#34925
gatsbybot merged 10 commits into
masterfrom
lmdb-resulthash-cache

Conversation

@imjoshin
Copy link
Copy Markdown
Contributor

Description

Cherry-picks 7c51853 as well as adds an invalidation step before workers are spawned.

Documentation

[sc-45891]

@gatsbot gatsbot Bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Feb 24, 2022
Comment thread packages/gatsby/src/query/query-runner.ts Outdated
Comment thread packages/gatsby/src/query/query-runner.ts Outdated
Comment thread packages/gatsby/src/query/query-runner.ts Outdated
@LekoArts LekoArts added topic: core Relates to Gatsby's core (e.g. page loading, reporter, state machine) and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Mar 9, 2022
Copy link
Copy Markdown
Contributor

@pieh pieh left a comment

Choose a reason for hiding this comment

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

LGTM, Thank you!

@pieh pieh added the bot: merge on green Gatsbot will merge these PRs automatically when all tests passes label Mar 11, 2022
@gatsbybot gatsbybot merged commit a5cd72a into master Mar 11, 2022
@gatsbybot gatsbybot deleted the lmdb-resulthash-cache branch March 11, 2022 11:43
raffishquartan pushed a commit to raffishquartan/gatsby that referenced this pull request Apr 28, 2026
…atsbyjs#34925)

* use lmdb for resultHash cache so shared across workers

* Clear lmdb before workers start processes queries

* Pull db name into const

* Undo reset changes, as it's not actually needed

* Undo accidental e2e change

* Add to pagepaths if component path/id was modified

* Update snapshots

* Move lmdb creation into function

* require -> import

Co-authored-by: Kyle Mathews <mathews.kyle@gmail.com>
Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
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)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants