Page MenuHomePhabricator

[identity] make sure otk exists when we delete it
ClosedPublic

Authored by varun on Apr 17 2024, 11:03 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 7, 1:22 PM
Unknown Object (File)
Sun, Nov 3, 7:29 AM
Unknown Object (File)
Oct 12 2024, 10:04 PM
Unknown Object (File)
Oct 12 2024, 10:04 PM
Unknown Object (File)
Oct 12 2024, 10:03 PM
Unknown Object (File)
Oct 12 2024, 10:03 PM
Unknown Object (File)
Sep 20 2024, 3:26 AM
Unknown Object (File)
Sep 8 2024, 8:19 AM
Subscribers

Details

Summary

since DeleteItem is idempotent, we need to check that the key actually exists when we try deleting it, otherwise we'll be decrementing the otk count but not actually removing any otks

Test Plan

confirmed that if the key doesn't exist, the transaction fails

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Theoretically, we should check if partition and sort key exist (because the otk attribute is present for all rows) but technically, this way also works - the "otk" attribute won't exist for non-existing row (implies non-existing primary key)

This revision is now accepted and ready to land.Apr 18 2024, 12:15 AM