Skip to content

Commit

Permalink
clientv3: retry remote connection on txn write failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Romano committed Feb 5, 2016
1 parent 7960bd8 commit a6008f4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions clientv3/txn.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,12 @@ func (txn *txn) Commit() (*TxnResponse, error) {
return (*TxnResponse)(resp), nil
}

if txn.isWrite {
if isRPCError(err) {
return nil, err
}

if isRPCError(err) {
if txn.isWrite {
go kv.switchRemote(err)
return nil, err
}

Expand Down

0 comments on commit a6008f4

Please sign in to comment.