awslabs / awslabs/amazon-redshift-utils
MultipleTableRestoreUtility Fails With InvalidClusterState Error When Restoring Multiple Tables From A Snapshot
- Dominant language
- Python
- Stars
- 2.8k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
When using the [MultipleTableRestoreUtility](https://github.com/awslabs/amazon-redshift-utils/tree/master/src/MultipleTableRestoreUtility), it only works for the first item in the list and fails for the next item due to "InvalidClusterState" exception as Redshift is in a modifying state for a uncertain amount of time (ranging from a few mins to about 15 mins). Adding exception handling on this error with some exponential back-off could be very helpful.
Exception:
`botocore.errorfactory.InvalidClusterStateFault: An error occurred (InvalidClusterState) when calling the RestoreTableFromClusterSnapshot operation: There is an operation running on the Cluster. Please try to restore table from snapshot at a later time.`
Contributor guide
Research direction
Start in the MultipleTableRestoreUtility linked in the issue and trace the RestoreTableFromClusterSnapshot call for each table. Reproduce the failure with multiple tables, then verify that InvalidClusterState is retried with increasing delays and that all requested tables restore successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python
- Domain
- cloud, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100