You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bad2b7d
Browse filesBrowse the repository at this point in the historyBrowse files
fix(dynamodb): Avoid tag race condition by using diff-based tag updates (#6479)
* fix(dynamodb): Avoid tag race condition by using diff-based tag updates
DynamoDB's TagResource and UntagResource are eventually consistent.
The old implementation removed all tags then re-added all desired tags
immediately, creating a race window where repeated store.apply() calls
would leave tables without any tags.
Fix: compute a diff between current and desired tags, then:
- Only remove keys that are truly obsolete (not in new config)
- Only add/update tags whose value is new or has changed
- If nothing changed, make zero API calls (idempotent)
This eliminates the race condition and also reduces unnecessary API
calls on repeated store.apply() with unchanged configuration.
Adds 7 unit tests covering: idempotency, add-only, remove-only,
value change, full replace, clear-all, and empty-both cases.
Fixes#6418
Signed-off-by: Harsh <[email protected]>
* style: run ruff auto-formatter to fix linting issues
Signed-off-by: Harsh <[email protected]>
---------
Signed-off-by: Harsh <[email protected]>
0 commit comments