mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 19:17:58 +00:00
Remove unused recovery field in dynamodb backend (#3569)
This commit is contained in:
committed by
Jeff Mitchell
parent
def7b5c510
commit
81f968fbe2
@@ -74,7 +74,6 @@ const (
|
||||
type DynamoDBBackend struct {
|
||||
table string
|
||||
client *dynamodb.DynamoDB
|
||||
recovery bool
|
||||
logger log.Logger
|
||||
haEnabled bool
|
||||
permitPool *physical.PermitPool
|
||||
@@ -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
|
||||
@@ -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 {
|
||||
@@ -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
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user