2030
err := backoff.ThrottleRetry(op, policy, acquireShardRetryable)
2031
if err != nil {
2032
>
// We got an non-retryable error, e.g. ShardOwnershipLostError
context_impl.go
2033
>
s.contextTaggedLogger.Error("Couldn't acquire shard", tag.Error(err))
2034
>
2035
>
reason := stopReasonUnspecified
2036
>
if IsShardOwnershipLostError(err) {
2037
reason = stopReasonOwnershipLost
2038
}
2039
// On any error, initiate shutting down the shard. If we already changed state
2040
// because we got a ShardOwnershipLostError, this won't do anything.
2041
>
_ = s.transition(contextRequestStop{reason: reason})
context_impl.go
2042
}
2043
}