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
If one attempts to run two relayer commands concurrently (eg. tx raw packet-send while the relayer is running), they will be greeted with an error like:
error: client create failed: tx error: Light client error: IO error: could not acquire lock on "data/DEEB0AB3F2D7BEC0B8C9FF1532715635314F54D5/db": Os { code: 35, kind: WouldBlock, message: "Resource temporarily unavailable" }
This happens because each processes will instantiate a chain runtime which in turn will instantiate a light client, and both light clients will attempt to open the same sled database.
In turns out that sled does not allow multiple processes to have the database file open at once, hence the error above.
Proposal
Implement a new instance of the LightStore trait backed by a database which supports concurrent use across processes (eg. SQLite, RocksDB).
Alternatively, standalone commands (ie. tx commands) could use an in-memory light store, thus reserving the on-disk on for the main relayer loop (start command). This has performance implication for those commands as they will start from an empty light store and should thus be evaluated carefully.
For Admin Use
Not duplicate issue
Appropriate labels applied
Appropriate milestone (priority) applied
Appropriate contributors tagged
Contributor assigned/self-assigned
The text was updated successfully, but these errors were encountered:
Crate
relayer
,relayer-cli
,tendermint-light-client
Problem Definition
If one attempts to run two relayer commands concurrently (eg.
tx raw packet-send
while the relayer is running), they will be greeted with an error like:This happens because each processes will instantiate a chain runtime which in turn will instantiate a light client, and both light clients will attempt to open the same
sled
database.In turns out that
sled
does not allow multiple processes to have the database file open at once, hence the error above.Proposal
Implement a new instance of the
LightStore
trait backed by a database which supports concurrent use across processes (eg. SQLite, RocksDB).Alternatively, standalone commands (ie.
tx
commands) could use an in-memory light store, thus reserving the on-disk on for the main relayer loop (start
command). This has performance implication for those commands as they will start from an empty light store and should thus be evaluated carefully.For Admin Use
The text was updated successfully, but these errors were encountered: