You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we do not have a mechanism to block multiple Database instances to be , i.e., multiple embedded Kuzu instances running on the same database directory. This should not be allowed as long as we do not have a mechanism to make Database instances read-only. This is because this leads to the following problem if these processes are allowed to write.
Suppose there are 2 separate OS processes: P1 and P2 running Kuzu:
P1 writes something to the database. For example adds a new User node. Suppose there was 5 User nodes before. Now there is 6.
P2 will not be able to see this write because parts of the database data, e.g., catalog or node_statistics_and_deleted_ids, as always kept in memory and there is no mechanism for P2 to know that these parts have been modified, and refresh them. In this example, there is no way for P2 to know that node_statistics_and_deleted_ids have been modified. So it will think that there are still 5 User nodes.
Probably the most common case this would appear is if there are 2 separate OS processes running Kuzu but this is not really about number of processes. This is about number of Database instances. Database here refers to the object in program lines like this: auto database = make_unique<Database>(*databaseConfig, *systemConfig);.
We should add a note about this to the documentation's Client APIs and solve this immediately after phase 1 release.
The text was updated successfully, but these errors were encountered:
semihsalihoglu-uw
changed the title
Disallowing multiple processes running on the same database directory
Disallowing multiple Database instances (e.g., from multiple processes) running on the same database directory
Nov 5, 2022
Currently we do not have a mechanism to block multiple Database instances to be , i.e., multiple embedded Kuzu instances running on the same database directory. This should not be allowed as long as we do not have a mechanism to make Database instances read-only. This is because this leads to the following problem if these processes are allowed to write.
Suppose there are 2 separate OS processes: P1 and P2 running Kuzu:
Probably the most common case this would appear is if there are 2 separate OS processes running Kuzu but this is not really about number of processes. This is about number of
Database
instances. Database here refers to the object in program lines like this:auto database = make_unique<Database>(*databaseConfig, *systemConfig);
.We should add a note about this to the documentation's Client APIs and solve this immediately after phase 1 release.
The text was updated successfully, but these errors were encountered: