Skip to content

Commit 6f458ef

Browse files
verify table bugfix
1 parent 6929020 commit 6f458ef

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/FSharp.DynamoDB/TableContext.fs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -564,16 +564,17 @@ type TableContext<'TRecord> internal (client : IAmazonDynamoDB, tableName : stri
564564

565565
match response with
566566
| Choice1Of2 td ->
567+
if td.Table.TableStatus <> TableStatus.ACTIVE then
568+
do! Async.Sleep 1000
569+
return! verify (retries - 1)
570+
else
571+
567572
let existingSchema = TableKeySchema.OfTableDescription td.Table
568573
if existingSchema <> template.KeySchema then
569574
sprintf "table '%s' exists with key schema %A, which is incompatible with record '%O'."
570575
tableName existingSchema typeof<'TRecord>
571576
|> invalidOp
572577

573-
if td.Table.TableStatus <> TableStatus.ACTIVE then
574-
do! Async.Sleep 1000
575-
return! verify (retries - 1)
576-
577578
| Choice2Of2 (:? ResourceNotFoundException) when createIfNotExists ->
578579
let provisionedThroughput =
579580
match provisionedThroughput with

0 commit comments

Comments
 (0)