-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Unexpected object caching #2565
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
Comments
That is highly unlikely as we don't store anything on Parse-server itself. That has to be related to your restoration process. |
Any hint how I could evaluate whether it's related to the mongodb restoration? The "ghost objects" for sure don't come from the backup data itself. I created the dump once and did not touch it afterwards; by looking at the objects' Btw -- I even could reproduce this with parse-dashboard: after the db reset (step 3 in my above list) I tried to manually add a class of the same name from inside the dashboard (without creating any instances); as soon as the class appeared in the data browser, the old instances popped up again. |
I tried to reproduce the issue with a fresh system and came to the same result. Here are the required steps:
In my test environment this process reproducibly results in the described issue. Can someone confirm? |
I think this is happening because of your usage of drop:
So in your backup there documents for _Schema but no documents for the Data collection. When you restore, the _Schema will be dropped and recreated. Data will be unaffected. This will result in the dashboard not knowing about Data until you recreate it. If you took your backup after creating the Data class but not adding data then you would get the same result without having to recreate the schema. You can also verify by repeating your steps up to and including 6, then enter the mongo shell: |
Great, thanks for your help with this! I'll change my test process to just copy a backup mongo data dir over instead of using |
For testing purpose, I regularly want to reset the database content with
mongorestore
(parse-server
is shut down while running that command). After the reset I run some code which creates a new class. Then, when I repeat the process -- reset the db, run the code again -- something weird happens: Parse seems to remember that class's instances from the previous run and recreates them. So with every run, I get more instances.Again in short:
Can this be explained, or is it a bug?
The text was updated successfully, but these errors were encountered: