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
F3394728: D11678.id39189.diff
Sat, Nov 30, 9:34 PM
Unknown Object (File)
Thu, Nov 28, 4:49 AM
Unknown Object (File)
Thu, Nov 28, 2:42 AM
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
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