dynamoDB reads are not fully consisten by default

Use fully consistent reads for backend operations.
This commit is contained in:
James Bardin 2017-10-27 16:43:30 -04:00
parent 633d428c15
commit b040cd0837
1 changed files with 2 additions and 0 deletions

View File

@ -272,6 +272,7 @@ func (c *RemoteClient) getMD5() ([]byte, error) {
},
ProjectionExpression: aws.String("LockID, Digest"),
TableName: aws.String(c.ddbTable),
ConsistentRead: aws.Bool(true),
}
resp, err := c.dynClient.GetItem(getParams)
@ -342,6 +343,7 @@ func (c *RemoteClient) getLockInfo() (*state.LockInfo, error) {
},
ProjectionExpression: aws.String("LockID, Info"),
TableName: aws.String(c.ddbTable),
ConsistentRead: aws.Bool(true),
}
resp, err := c.dynClient.GetItem(getParams)