You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ImmutableDB: allow reading concurrently with appending
Read the potentially stale value of the internal state provided by the
`StrictMVar` instead of blocking on the `TMVar` in case an appender has locked
it. Reads can safely happen concurrently with appends, so this will allow for
some more concurrency.
I don't expect this to make any impact for a "client" node that is syncing, as
it will typically not read from its ImmutableDB, only append to it, which is
necessarily sequential. However, a "server" node might have to read
headers/blocks from its ImmutableDB to serve to other nodes. Serving multiple
requests won't require taking + putting a `TMVar` anymore, it's just reading a
`TVar` now.
I expect to see the most improvement for a node serving others while it is
also still syncing itself. Blocks being appended to the ImmutableDB will
happen concurrently with all read requests.
0 commit comments