namada icon indicating copy to clipboard operation
namada copied to clipboard

Avoid blocking state updates on client queries

Open sug0 opened this issue 1 year ago • 1 comments

We currently use RocksDB as our database backend. RocksDB has an interesting snapshot feature, which provides read-only access to the database without blocking subsequent writes.

Namada's ABCI Query implementation, as of v0.43.0, blocks on incoming requests, since it exclusively borrows the Shell (an abstraction holding all in-memory/persisted state in Namada).

Perhaps we could leverage RocksDB snapshots to allow up to some configurable number of $n$ queries to execute concurrently, before ultimately blocking on a request (or handling it as a background job without blocking state updating ABCI requests at all).

sug0 avatar Aug 29 '24 08:08 sug0