Database not up to the requested version

We encounter this problem:

Database 'neo4j' not up to the requested version: 48. Latest database version is 42

The problem occurs in a junit test, not a high-load system.
A similar issue is reported here
My Neo4j version is 4.2.4.
What's the problem about? What should we do?

I also ran with Neo4j 4.3.0. But, still the same error (only numbers changed: 41 and 35).

Hmm sounds like the database was not correctly shut down or cleaned out after your test run?
I.e. some transactions are missing but the tx log cannot be found.

Can you share more about your unit-test?

Is there any shared resources among different Neo4j instances?

Maybe, when we copy a database and then start the original one and the copied one and connect to them at the same time, some problems happen. But, if we start and connect to two different databases at the same time, there is no problem. I start the databases as embedded databases.

Is there any caching, .... that looks up by, e.g., graphid, so when we work with a database and its copied version, some problems happen?

Hmm if you use embedded you need to be very careful that you are not starting two instances that point to the same disk location at the same time, that can cause unrecoverable havoc.

No. they are not at the same location. One is copied and both the original one and the copied one are started.

Hmm, then I don't know. How did you "copy" the database? With neo4j-admin dump/load or neo4j-admin copy?

You should not copy any folders/directories yourself as a database is nowadays spread out over several folders (at least data/transactions/* and data/databases/* in the future potentially more)

Please create a GH issue best with a project with the Java code to reproduce the problem.