Skip to content

Commit

Permalink
Remove unused recovery field in dynamodb backend (#3569)
Browse files Browse the repository at this point in the history
  • Loading branch information
ungureanuvladvictor authored and jefferai committed Nov 13, 2017
1 parent def7b5c commit 81f968f
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions physical/dynamodb/dynamodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ const (
type DynamoDBBackend struct {
table string
client *dynamodb.DynamoDB
recovery bool
logger log.Logger
haEnabled bool
permitPool *physical.PermitPool
Expand All @@ -96,7 +95,6 @@ type DynamoDBLock struct {
identity string
held bool
lock sync.Mutex
recovery bool
// Allow modifying the Lock durations for ease of unit testing.
renewInterval time.Duration
ttl time.Duration
Expand Down Expand Up @@ -211,12 +209,6 @@ func NewDynamoDBBackend(conf map[string]string, logger log.Logger) (physical.Bac
}
haEnabledBool, _ := strconv.ParseBool(haEnabled)

recoveryMode := os.Getenv("RECOVERY_MODE")
if recoveryMode == "" {
recoveryMode = conf["recovery_mode"]
}
recoveryModeBool, _ := strconv.ParseBool(recoveryMode)

maxParStr, ok := conf["max_parallel"]
var maxParInt int
if ok {
Expand All @@ -233,7 +225,6 @@ func NewDynamoDBBackend(conf map[string]string, logger log.Logger) (physical.Bac
table: table,
client: client,
permitPool: physical.NewPermitPool(maxParInt),
recovery: recoveryModeBool,
haEnabled: haEnabledBool,
logger: logger,
}, nil
Expand Down Expand Up @@ -433,7 +424,6 @@ func (d *DynamoDBBackend) LockWith(key, value string) (physical.Lock, error) {
key: pkgPath.Join(pkgPath.Dir(key), DynamoDBLockPrefix+pkgPath.Base(key)),
value: value,
identity: identity,
recovery: d.recovery,
renewInterval: DynamoDBLockRenewInterval,
ttl: DynamoDBLockTTL,
watchRetryInterval: DynamoDBWatchRetryInterval,
Expand Down

0 comments on commit 81f968f

Please sign in to comment.