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
When using postgresql as a database, it's possible that sometimes the DB is not available. We need to investigate whether the DB being unavailable will cause any kind of panic in the execution of waku, and add a reconnection mechanism that perhaps is already provided by the postgresql dependency we are using
This task probably makes sense to do along with #607
The text was updated successfully, but these errors were encountered:
@richard-ramos
sql.DB internally has reconnection strategy to connect again, in case all prev db connections are not alive.
There are 3 services that use db -- peerStore, store and rendevzous protocol.
In rendevzous protocol, we have DB wrapper over sql.DB connector. This wrapper safely uses sql.DB and in case of any db related failure it returns error. This wrapper is passed to go-libp2p-rendezvous which logs the error, and doesn't fail on db related errors.
In DBStore uses sql.DB for Query/GetAll,Put and MostRecentTimestamp function calls. It is used in waku_store protocol, and all errors are returned to caller. No panic causing conditions found.
PeerStore passes the db to go-libp2p's AddrBook, KeyBook and PeerMetaData, for storing peer details. All db related errors are handled by libp2p/peerstoreds.
Problem
When using postgresql as a database, it's possible that sometimes the DB is not available. We need to investigate whether the DB being unavailable will cause any kind of panic in the execution of waku, and add a reconnection mechanism that perhaps is already provided by the postgresql dependency we are using
This task probably makes sense to do along with #607
The text was updated successfully, but these errors were encountered: