When using the Go bindings, is there a way to prevent Transact from retrying when the transaction fails due to taking more than 5 seconds (FoundationDB error code 1007 (Transaction is too old to perform reads or be committed)
? For example, this code will just keep on retrying forever:
_, err := db.Transact(func(tr fdb.Transaction) (interface{}, error) {
tr.Get(fdb.Key("foo")).MustGet()
// Simulate slow transaction
time.Sleep(6 * time.Second)
tr.Set(fdb.Key("bar"), []byte{1})
return nil, nil
})