Skip to content

aws_dynamodb_cdc: support DynamoDB Global Tables for the checkpoint t…#4529

Open
squiidz wants to merge 1 commit into
mainfrom
aws_dynamodb_cdc_global_table
Open

aws_dynamodb_cdc: support DynamoDB Global Tables for the checkpoint t…#4529
squiidz wants to merge 1 commit into
mainfrom
aws_dynamodb_cdc_global_table

Conversation

@squiidz

@squiidz squiidz commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

aws_dynamodb_cdc: support DynamoDB Global Tables for the checkpoint table

Add `global_table` / `global_table_replicas` options so the auto-created
checkpoint table is provisioned as a DynamoDB Global Table (v2), replicating
shard checkpoints across regions for low-RPO multi-region failover.

Checkpoints are keyed by a region-portable identifier (the source table name)
and store the stream ARN and record timestamp. Resume is layered: same-region
restarts resume exactly via AfterSequenceNumber (unchanged behavior), while a
failed-over region resumes from the trim horizon, skipping records at or before
the low-water-mark timestamp of the prior region's checkpoints. Table creation
enables DynamoDB Streams and provisions/reconciles replica regions; all new
behavior is gated behind `global_table` and is a no-op when disabled.

…able

Add `global_table` / `global_table_replicas` options so the auto-created
checkpoint table is provisioned as a DynamoDB Global Table (v2), replicating
shard checkpoints across regions for low-RPO multi-region failover.

Checkpoints are keyed by a region-portable identifier (the source table name)
and store the stream ARN and record timestamp. Resume is layered: same-region
restarts resume exactly via AfterSequenceNumber (unchanged behavior), while a
failed-over region resumes from the trim horizon, skipping records at or before
the low-water-mark timestamp of the prior region's checkpoints. Table creation
enables DynamoDB Streams and provisions/reconciles replica regions; all new
behavior is gated behind `global_table` and is a no-op when disabled.
@claude

claude Bot commented Jun 17, 2026

Copy link
Copy Markdown

Commits
LGTM

Review
Reviewed the addition of DynamoDB Global Table support for the aws_dynamodb_cdc checkpoint table (portable table-name key in global mode, replica reconciliation, time-based failover resume, and the new dynamodb_approximate_creation_time metadata / dynamodb_cdc_failover_skipped metric).

The change is well-structured and follows project patterns: the CheckpointerConfig struct replaces positional args, errors are wrapped with %w in gerund form, context is propagated correctly, field names use constants, the resume cache is synchronized via sync.Once, license headers match the package (RCL/enterprise), and the failover skip logic (\!After(cutoff)) matches the documented at-least-once design with proper nil guards. The parallel lastTimestamps map is bounded alongside lastCheckpoints, and both single- and multi-table read paths are wired consistently. New unit tests cover checkpointer create/reconcile/resume, batcher timestamp tracking, and config parsing/validation.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant