Page MenuHomePhabricator

[blob-service] DB: Add remaining client methods
AbandonedPublic

Authored by bartek on Jul 9 2023, 2:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, May 4, 3:17 PM
Unknown Object (File)
Sat, May 4, 12:04 PM
Unknown Object (File)
Sat, May 4, 12:02 PM
Unknown Object (File)
Sat, May 4, 11:30 AM
Unknown Object (File)
Thu, May 2, 7:52 AM
Unknown Object (File)
Tue, Apr 30, 3:41 AM
Unknown Object (File)
Fri, Apr 26, 8:06 AM
Unknown Object (File)
Tue, Apr 16, 8:16 AM
Subscribers

Details

Summary

Part of ENG-4269.

Added methods to manage the unchecked status of database items - this will be used in the cleanup task in the future. Design is described in-depth in the notion doc attached to the parent linear issue.

Depends on D8451.

Test Plan

Tested together with the two previous diffs

Created a custom testing sandbox to play with these:

  1. Checkout this stack
  2. Apply this patch and copy the tests.rs file contents attached there to the services/blob/src/database/client/tests.rs.
  3. cargo run

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

bartek held this revision as a draft.
bartek edited the test plan for this revision. (Show Details)
bartek published this revision for review.Jul 10 2023, 12:43 AM

rust LGTM, would like for someone else to take a look

varun requested changes to this revision.Jul 13 2023, 10:16 AM

I think BatchWriteItem needs to be called in a loop. We might also need to implement exponential backoff. More info here: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchWriteItem.html

This revision now requires changes to proceed.Jul 13 2023, 10:16 AM

The same as I mentioned in D8450, @varun is right - this needs a significant rework. Hopefully, we don't need these methods now - they will be used in the cleanup task which is not there yet so I excluded this from the core stack to unblock