*: add themis retry error check
remove go-themis circular dependency
This commit is contained in:
@ -21,6 +21,7 @@ import (
|
||||
|
||||
"github.com/juju/errors"
|
||||
"github.com/ngaut/log"
|
||||
"github.com/pingcap/go-themis"
|
||||
"github.com/pingcap/tidb/terror"
|
||||
)
|
||||
|
||||
@ -33,6 +34,7 @@ func IsRetryableError(err error) bool {
|
||||
if terror.ErrorEqual(err, ErrRetryable) ||
|
||||
terror.ErrorEqual(err, ErrLockConflict) ||
|
||||
terror.ErrorEqual(err, ErrConditionNotMatch) ||
|
||||
terror.ErrorEqual(err, themis.ErrRetryable) ||
|
||||
// HBase exception message will tell you if you should retry or not
|
||||
strings.Contains(err.Error(), "try again later") {
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user