legion-labs / legion

Legion monorepo, contains the legion engine, the tools, source control, build system etc...
https://book.legionengine.com
Other
16 stars 2 forks source link

Add in-memory transaction to source-control #2068

Closed R3DP1XL closed 2 years ago

R3DP1XL commented 2 years ago

Add a child in-memory provider (i.e. a transaction) in source-control workspace. This transaction is automatically committed after each write operation (ex: delete / add / update resource). This is done to protect the indices stored in the source-control database (commit tables), so that they won't be altered.

We had discussions regarding the use of a volatile provider (with persistent fallback), as a transaction. However, since the same process may want to use the volatile provider without a persistent fallback, e.g. for derived resources, a short-lived in-memory transaction was chosen instead.