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, Nov 23, 12:48 PM
Unknown Object (File)
Fri, Nov 22, 8:26 AM
Unknown Object (File)
Thu, Nov 14, 8:13 AM
Unknown Object (File)
Tue, Nov 12, 12:41 PM
Unknown Object (File)
Sat, Nov 9, 5:36 PM
Unknown Object (File)
Sat, Nov 2, 11:56 PM
Unknown Object (File)
Sat, Nov 2, 11:56 PM
Unknown Object (File)
Sat, Nov 2, 11:33 PM
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