@@ -15,7 +15,6 @@ package table
15
15
16
16
import (
17
17
"context"
18
- "errors"
19
18
"fmt"
20
19
"strings"
21
20
"time"
@@ -35,25 +34,21 @@ import (
35
34
36
35
var (
37
36
ErrTableDeleting = fmt .Errorf (
38
- "table in '%v' state, cannot be modified or deleted" ,
37
+ "Table in '%v' state, cannot be modified or deleted" ,
39
38
svcsdktypes .TableStatusDeleting ,
40
39
)
41
40
ErrTableCreating = fmt .Errorf (
42
- "table in '%v' state, cannot be modified or deleted" ,
41
+ "Table in '%v' state, cannot be modified or deleted" ,
43
42
svcsdktypes .TableStatusCreating ,
44
43
)
45
44
ErrTableUpdating = fmt .Errorf (
46
- "table in '%v' state, cannot be modified or deleted" ,
45
+ "Table in '%v' state, cannot be modified or deleted" ,
47
46
svcsdktypes .TableStatusUpdating ,
48
47
)
49
48
ErrTableGSIsUpdating = fmt .Errorf (
50
- "table GSIs in '%v' state, cannot be modified or deleted" ,
49
+ "Table GSIs in '%v' state, cannot be modified or deleted" ,
51
50
svcsdktypes .IndexStatusCreating ,
52
51
)
53
- ErrTableReplicasUpdating = fmt .Errorf (
54
- "table replica in '%v' state, cannot be modified or deleted" ,
55
- svcsdktypes .ReplicaStatusUpdating ,
56
- )
57
52
)
58
53
59
54
// TerminalStatuses are the status strings that are terminal states for a
@@ -79,16 +74,12 @@ var (
79
74
)
80
75
requeueWaitWhileUpdating = ackrequeue .NeededAfter (
81
76
ErrTableUpdating ,
82
- 10 * time .Second ,
77
+ 5 * time .Second ,
83
78
)
84
79
requeueWaitGSIReady = ackrequeue .NeededAfter (
85
80
ErrTableGSIsUpdating ,
86
81
10 * time .Second ,
87
82
)
88
- requeueWaitReplicasActive = ackrequeue .NeededAfter (
89
- ErrTableReplicasUpdating ,
90
- 10 * time .Second ,
91
- )
92
83
)
93
84
94
85
// tableHasTerminalStatus returns whether the supplied Dynamodb table is in a
@@ -233,17 +224,6 @@ func (rm *resourceManager) customUpdateTable(
233
224
}
234
225
return nil , err
235
226
}
236
- case delta .DifferentAt ("Spec.TableReplicas" ):
237
- // Enabling replicas required streams enabled and StreamViewType to be NEW_AND_OLD_IMAGES
238
- // Version 2019.11.21 TableUpdate API requirement
239
- if ! hasStreamSpecificationWithNewAndOldImages (desired ) {
240
- msg := "table must have DynamoDB Streams enabled with StreamViewType set to NEW_AND_OLD_IMAGES for replica updates"
241
- rlog .Debug (msg )
242
- return nil , ackerr .NewTerminalError (errors .New (msg ))
243
- }
244
- if err := rm .syncReplicas (ctx , latest , desired ); err != nil {
245
- return nil , err
246
- }
247
227
}
248
228
}
249
229
@@ -578,15 +558,6 @@ func customPreCompare(
578
558
}
579
559
}
580
560
581
- // Handle ReplicaUpdates API comparison
582
- if len (a .ko .Spec .TableReplicas ) != len (b .ko .Spec .TableReplicas ) {
583
- delta .Add ("Spec.TableReplicas" , a .ko .Spec .TableReplicas , b .ko .Spec .TableReplicas )
584
- } else if a .ko .Spec .TableReplicas != nil && b .ko .Spec .TableReplicas != nil {
585
- if ! equalReplicaArrays (a .ko .Spec .TableReplicas , b .ko .Spec .TableReplicas ) {
586
- delta .Add ("Spec.TableReplicas" , a .ko .Spec .TableReplicas , b .ko .Spec .TableReplicas )
587
- }
588
- }
589
-
590
561
if a .ko .Spec .DeletionProtectionEnabled == nil {
591
562
a .ko .Spec .DeletionProtectionEnabled = aws .Bool (false )
592
563
}
0 commit comments