Documentation ¶
Index ¶
Constants ¶
View Source
const ( FdbErrNotCommitted = "1020 - not_committed" FdbErrPastVersion = "1007 - past_version" FdbErrOnlineDdlInProgress = "Online DDL in progress for" )
Variables ¶
View Source
var ( // FdbRetryLimit is the maximum number of retries that will be attempted for db // errors which match the criteria to be classified as an operation that can // safely be retried [until it succeeds]. FdbRetryLimit = 100 )
Functions ¶
func ConfigureAliveSupport ¶
ConfigureAliveSupport sets up `Alive' soft-deletion support for the provided db instance.
func DbExecWithRetry ¶
DbExecWithRetry executes a statement on a `*gorm.DB` connection and checks for retriable errors. If any are found, it will retry statement execution. See http://community.foundationdb.com/questions/42717/foundationdb-commit-aborted-1020-not-committed.html for more information about why this is sometimes necessary.
func DbFnWithRetry ¶
DbFnWithRetry is just like ExecWithRetry except that it takes any function that produces a `*gorm.DB`.
func IsRetriableDbError ¶
IsRetriableDbError checks an error to see if it is of the retriable foundationdb variety.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.