Skip to content

Cleanup Schema cache per request #6126

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

Merged
merged 2 commits into from
Oct 11, 2019
Merged

Cleanup Schema cache per request #6126

merged 2 commits into from
Oct 11, 2019

Conversation

dplewis
Copy link
Member

@dplewis dplewis commented Oct 10, 2019

Closes: #6061

I updated the tests to run against enableSingleSchemaCache: false.

The cache isn't cleared if enableSingleSchemaCache: true

Lets see how this goes...

@codecov
Copy link

codecov bot commented Oct 10, 2019

Codecov Report

Merging #6126 into master will decrease coverage by <.01%.
The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6126      +/-   ##
==========================================
- Coverage   93.72%   93.71%   -0.01%     
==========================================
  Files         165      165              
  Lines       11199    11210      +11     
==========================================
+ Hits        10496    10506      +10     
- Misses        703      704       +1
Impacted Files Coverage Δ
src/Adapters/Cache/RedisCacheAdapter/index.js 97.95% <80%> (-2.05%) ⬇️
src/PromiseRouter.js 89.01% <85.71%> (-0.41%) ⬇️
...dapters/Storage/Postgres/PostgresStorageAdapter.js 97.01% <0%> (-0.09%) ⬇️
src/RestWrite.js 93.72% <0%> (+0.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 84b79ba...42ae2e2. Read the comment docs.

@dplewis
Copy link
Member Author

dplewis commented Oct 11, 2019

This should work for every express router endpoint.

If not an endpoint like performInitialization on startup and the similar, will always leave a key / value in redis.

A TTL value will clean those up.

Copy link
Contributor

@acinader acinader left a comment

Choose a reason for hiding this comment

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

lgtm. documentation?

@dplewis
Copy link
Member Author

dplewis commented Oct 11, 2019

Sure I can add documentation.

@dplewis dplewis merged commit edfa1df into master Oct 11, 2019
@dplewis dplewis deleted the cleanup-cache branch October 11, 2019 20:27
UnderratedDev pushed a commit to UnderratedDev/parse-server that referenced this pull request Mar 21, 2020
* remove enableSingleSchemaCache from test

* clear schema cache per request
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.

Memory leak issues when upgrading form parse server ‘~2.x’ to ‘~3.x’
2 participants