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
Claim writer and channel watcher run in separate processes but access the same db. Did you find a solution for accessing the db from multiple processes? From the levelup docs:
Stores like LevelDB are thread-safe but they are not suitable for accessing with multiple processes. You should only ever have a store open from a single Node.js process. Node.js clusters are made up of multiple processes so a levelup instance cannot be shared between them either.
See the aformentioned wiki for modules like multilevel, that may help if you require a single store to be shared across processes.
I didn't find a good solution yet. Right now the XRP plugin is using lowdb, which just writes to a JSON file on disk. I was in the middle of trying to switch it over to using a levelup-compliant store but haven't yet.
Multilevel seems like a good option but is unfortunately out of date and not compatible with the latest levelup version.
I was also looking into whether using RocksDB (Facebook's fork of leveldb) would be an option, because it allows for multiple readers. The Node.js module unfortunately doesn't expose the read-only option right now but it should be possible to add that (see Level/rocksdb#13 (comment))).
Claim writer and channel watcher run in separate processes but access the same db. Did you find a solution for accessing the db from multiple processes? From the levelup docs:
Did you check multilevel?
The text was updated successfully, but these errors were encountered: