We replace shared references (&) and Rcs with Arcs to simplify multithreaded behaviour.
This decision comes from the fundamental idea that Databases are not going to have any lexical lifetime - they are purely controlled by runtime/user intent. As a result, we cannot use storage or databases with basic Rust lifetimes.
Additionally, this decision sets us up transactions management on shutdown or database delete: transactions that are operating will be guaranteed the database is open. We will wait for current operations to finish + prevent new work from entering when trying to close the database. This will prevent a class of errors from from TypeDB 2.0 which were caused by 'resource's closing during transaction operation.
Implementation
WIP: the server builds and storage integration tests pass, but nothing else. Propagated to all tests so the whole codebase builds.
Usage and motivation
We replace shared references (
&
) andRc
s withArc
s to simplify multithreaded behaviour.This decision comes from the fundamental idea that Databases are not going to have any lexical lifetime - they are purely controlled by runtime/user intent. As a result, we cannot use storage or databases with basic Rust lifetimes.
Additionally, this decision sets us up transactions management on shutdown or database delete: transactions that are operating will be guaranteed the database is open. We will wait for current operations to finish + prevent new work from entering when trying to close the database. This will prevent a class of errors from from TypeDB 2.0 which were caused by 'resource's closing during transaction operation.
Implementation
WIP: the server builds and storage integration tests pass, but nothing else.Propagated to all tests so the whole codebase builds.