mirror of https://github.com/citusdata/citus.git
In short, add wrappers around Postgres' AddWaitEventToSet() and ModifyWaitEvent(). AddWaitEventToSet()/ModifyWaitEvent*() may throw hard errors. For example, when the underlying socket for a connection is closed by the remote server and already reflected by the OS, however Citus hasn't had a chance to get this information. In that case, if replication factor is >1, Citus can failover to other nodes for executing the query. Even if replication factor = 1, Citus can give much nicer errors. So CitusAddWaitEventSetToSet()/CitusModifyWaitEvent() simply puts AddWaitEventToSet()/ModifyWaitEvent() into a PG_TRY/PG_CATCH block in order to catch any hard errors, and returns this information to the caller. |
||
---|---|---|
.. | ||
backend | ||
include | ||
test |