Skip to content

Define transaction atomicity areas #470

@rpanic

Description

@rpanic

Currently, protokit considers all database operations to be part of one single atomicity unit.
However, in reality we use Redis and Prisma concurrently for different parts of the data store and those are obviously in different atomicity and isolation units, i.e. we can't enforce atomicity in both at the same time. In the codebase however, we do it exactly like this (we nest the one transaction API inside the other).
To fix this, we need to separate the following things:

  • Database (State, Blocks, Transactions, ...)
  • Trees

In the codebase, they will have the following modules (generate by some UX-enhancing collection module like PrismaRedisDatabase)

  • Database
  • TreeDatabase

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

In Review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions