-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
DynamoDB: Improve global table replicas #8549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
992bf7f to
d94dbc0
Compare
d94dbc0 to
270d269
Compare
| finally: | ||
| # revert the original context | ||
| context.region = original_region | ||
| context.request.headers["Authorization"] = original_authorization |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This restores the original context even if there is an exception in the context block
270d269 to
66331cc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for tackling and the docs update 👍
| GLOBAL_TABLES: Dict[str, Dict] = CrossRegionAttribute(default=dict) | ||
|
|
||
| # Maps table name to the region they exist in on DDBLocal (for v.2019 global tables) | ||
| TABLE_REGION: Dict[TableName, RegionName] = CrossRegionAttribute(default=dict) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: we could use the standard collection for type hints.
This PR:
Because the model definition is changed, this PR will cause loss of DynamoDB resources in existing cloud pods.
Docs: localstack/docs#671