restatedev / restate

Restate is the platform for building resilient applications that tolerate all infrastructure faults w/o the need for a PhD.
https://docs.restate.dev
Other
1.66k stars 38 forks source link

[Storage] Transaction doesn't support read your own writes #851

Open slinkydeveloper opened 1 year ago

slinkydeveloper commented 1 year ago

Currently the RocksDBTransaction type doesn't support read your own writes. Due to that we cannot process batch of effects, e.g. we cannot create a virtual journal and append an entry afterwards.

This is currently an issue for the RemoteContext and the NBIS, but it is also a potential cause of bugs in future in case we start batching events from the invoker, or if we start receiving batch of commands from the consensus algorithm.

slinkydeveloper commented 1 year ago

One solution would be to modify RocksDBTransaction to support read your own writes transparently, and then take a batch of commands and loop each command through StateMachine::process committing the transaction, and processing the Action, only at the end.