rxdb icon indicating copy to clipboard operation
rxdb copied to clipboard

Problem with migration during app downgrade

Open Elendiar opened this issue 7 months ago • 5 comments

Problematic behavior detected when downgrading a program. High cpu load and memory leak after while without any console.log message.

Image

Image

Dexie function calls Image

I noticed that rx-migration-state-meta is constantly being recreated on deletion and updated. And there is definitely some problem in this. All workplaces migration was just 1: (oldData) => oldData Image

Timestamps are constantly updated. Image

When deleting the IndexedDb the problem is solved. But the problem is that such behavior is hidden and it may not be noticed right away, which will lead to a problems in case of mass program downgrade.

Elendiar avatar May 15 '25 06:05 Elendiar

Hi, can you create a test case to reproduce this behavior?

pubkey avatar May 19 '25 09:05 pubkey

@pubkey Hello reproduce this in https://github.com/Elendiar/rxdb-issue-test-case

Elendiar avatar May 21 '25 11:05 Elendiar

This issue has been automatically marked as stale because it has not had recent activity. It will be closed soon. Please update it or it may be closed to keep our repository organized. The best way is to add some more information or make a pull request with a test case. Also you might get help in fixing it at the RxDB Community Chat If you know you will continue working on this, just write any message to the issue (like "ping") to remove the stale tag.

stale[bot] avatar May 28 '25 11:05 stale[bot]

@Elendiar are you increasing the schema version and then redeploy it with a downgraded version number? Because this is not supported, the migration only works in one direction.

pubkey avatar Jun 06 '25 09:06 pubkey

@pubkey Yes, but is it possible to handle this somehow to avoid implicit use of resources?

Elendiar avatar Jun 06 '25 15:06 Elendiar

Not sure, I do not see any reason for downgrading a schema version at any point.

pubkey avatar Jun 12 '25 13:06 pubkey

This issue has been automatically marked as stale because it has not had recent activity. It will be closed soon. Please update it or it may be closed to keep our repository organized. The best way is to add some more information or make a pull request with a test case. Also you might get help in fixing it at the RxDB Community Chat If you know you will continue working on this, just write any message to the issue (like "ping") to remove the stale tag.

stale[bot] avatar Jun 19 '25 13:06 stale[bot]

Issues are autoclosed after some time. If you still have a problem, make a PR with a test case or to prove that you have tried to fix the problem.

stale[bot] avatar Jul 10 '25 13:07 stale[bot]