Raised by the code review of PR #1439, which added the table-level on-demand
ceiling reset.
That reset is deliberately suppressed unless the table is PAY_PER_REQUEST on
BOTH sides of the deploy (onDemandCeilingLive), because sending
OnDemandThroughput on a provisioned table is a ValidationException. The open
question the reviewer raised is what happens to a ceiling that was live before a
flip TO PROVISIONED:
- Deploy A:
PAY_PER_REQUEST + WriteOnDemandThroughputSettings.MaxWriteRequestUnits: 200.
- Deploy B: flips to
PROVISIONED and drops the block. The reset is suppressed
(correctly — the field is meaningless on a provisioned table).
- Deploy C: flips back to
PAY_PER_REQUEST, still with no block. previousProperties
is now deploy B's template, which carries no WriteOnDemandThroughputSettings,
so the reset never fires.
If DynamoDB RETAINS the table-level OnDemandThroughput across the flip to
PROVISIONED and restores it on the flip back, the 200 ceiling resurfaces at
step 3 with nothing in the template asking for it, and no subsequent deploy can
clear it — the exact silent-stale-ceiling outcome #1434 set out to remove, just
reached by a longer path.
If AWS instead DROPS the member on the flip to PROVISIONED, there is nothing to
strand and this issue can be closed as not-a-bug.
This is unresolved, not assumed
It was NOT settled by the #1434 probes: that run cleared the table-level ceiling
({MaxReadRequestUnits: -1}) BEFORE flipping to PROVISIONED, so the readback
after the flip says nothing about retention.
How to settle it
One probe, on a throwaway table:
CreateTable PAY_PER_REQUEST with OnDemandThroughput: {MaxWriteRequestUnits: 200}.
UpdateTable BillingMode: PROVISIONED + ProvisionedThroughput.
DescribeTable — is OnDemandThroughput still reported?
UpdateTable back to PAY_PER_REQUEST, sending NO OnDemandThroughput.
DescribeTable — did the 200 come back?
Note the probe hazard recorded on #1434: do NOT probe reset shapes with an empty
container ({}) on this type — it was accepted and then wedged a global table in
UPDATING for over an hour, leaving an orphan AWS refused to delete for 24h.
This probe only needs value-shaped payloads, so it is safe.
If retention is confirmed
The fix is probably to compare against the last known ON-DEMAND-era desired
state rather than the immediately-previous template, or to re-assert the reset
on the flip back to PAY_PER_REQUEST when AWS reports a ceiling that no
template declares (an observed-state-driven reset rather than a diff-driven
one).
Raised by the code review of PR #1439, which added the table-level on-demand
ceiling reset.
That reset is deliberately suppressed unless the table is
PAY_PER_REQUESTonBOTH sides of the deploy (
onDemandCeilingLive), because sendingOnDemandThroughputon a provisioned table is a ValidationException. The openquestion the reviewer raised is what happens to a ceiling that was live before a
flip TO
PROVISIONED:PAY_PER_REQUEST+WriteOnDemandThroughputSettings.MaxWriteRequestUnits: 200.PROVISIONEDand drops the block. The reset is suppressed(correctly — the field is meaningless on a provisioned table).
PAY_PER_REQUEST, still with no block.previousPropertiesis now deploy B's template, which carries no
WriteOnDemandThroughputSettings,so the reset never fires.
If DynamoDB RETAINS the table-level
OnDemandThroughputacross the flip toPROVISIONED and restores it on the flip back, the 200 ceiling resurfaces at
step 3 with nothing in the template asking for it, and no subsequent deploy can
clear it — the exact silent-stale-ceiling outcome #1434 set out to remove, just
reached by a longer path.
If AWS instead DROPS the member on the flip to PROVISIONED, there is nothing to
strand and this issue can be closed as not-a-bug.
This is unresolved, not assumed
It was NOT settled by the #1434 probes: that run cleared the table-level ceiling
(
{MaxReadRequestUnits: -1}) BEFORE flipping to PROVISIONED, so the readbackafter the flip says nothing about retention.
How to settle it
One probe, on a throwaway table:
CreateTablePAY_PER_REQUESTwithOnDemandThroughput: {MaxWriteRequestUnits: 200}.UpdateTableBillingMode: PROVISIONED+ProvisionedThroughput.DescribeTable— isOnDemandThroughputstill reported?UpdateTableback toPAY_PER_REQUEST, sending NOOnDemandThroughput.DescribeTable— did the 200 come back?Note the probe hazard recorded on #1434: do NOT probe reset shapes with an empty
container (
{}) on this type — it was accepted and then wedged a global table inUPDATINGfor over an hour, leaving an orphan AWS refused to delete for 24h.This probe only needs value-shaped payloads, so it is safe.
If retention is confirmed
The fix is probably to compare against the last known ON-DEMAND-era desired
state rather than the immediately-previous template, or to re-assert the reset
on the flip back to
PAY_PER_REQUESTwhen AWS reports a ceiling that notemplate declares (an observed-state-driven reset rather than a diff-driven
one).