Page MenuHomePhabricator

[lib] Add action type for processing holders
ClosedPublic

Authored by bartek on Fri, Sep 20, 6:21 AM.
Tags
None
Referenced Files
F3004124: D13408.id44414.diff
Fri, Oct 18, 12:27 PM
Unknown Object (File)
Mon, Oct 14, 12:44 PM
Unknown Object (File)
Mon, Oct 14, 12:43 PM
Unknown Object (File)
Mon, Oct 14, 12:43 PM
Unknown Object (File)
Sat, Oct 12, 12:15 AM
Unknown Object (File)
Fri, Oct 11, 11:11 PM
Unknown Object (File)
Sun, Oct 6, 9:15 AM
Unknown Object (File)
Thu, Oct 3, 6:04 PM
Subscribers

Details

Summary

Added action types and updated reducer for the "process holders" action.

  • Holders are marked as PENDING_ESTABLISHMENT or PENDING_REMOVAL, before making Blob calls
  • Afterwards they're either removed or marked as ESTABLISHED.
  • In case of failure, all of them are marked as NOT_ESTABLISHED / NOT_REMOVED. This will be then handled by a handler component (introduced later) for retrying.

Depends on D13403

Test Plan
  • Reducer unit tests
  • Tested together with actual Blob calls

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Fri, Sep 20, 6:43 AM
lib/actions/holder-actions.js
14–23 ↗(On Diff #44371)

Why aren't these types read-only?

kamil requested changes to this revision.Fri, Sep 20, 8:16 AM
kamil added inline comments.
lib/actions/holder-actions.js
3–4 ↗(On Diff #44371)
7 ↗(On Diff #44371)

nit: I would remove StoreEstablishedHolderPayload and use BlobHashAndHolder directly

14–23 ↗(On Diff #44371)
lib/reducers/holder-reducer.js
63 ↗(On Diff #44371)

I think we should change this, update PROCESS_HOLDERS_FAILED to have failed hashes as payload (similar as here) and only those mark as failed.

Additionally wondering, if we really need pending states after this.

This revision now requires changes to proceed.Fri, Sep 20, 8:16 AM

Updated types and failure action

This revision is now accepted and ready to land.Mon, Sep 23, 5:09 AM
lib/reducers/holder-reducer.js
63 ↗(On Diff #44371)

makes sense, thanks!

Additionally wondering, if we really need pending states after this.

Yes, we need it to avoid unnecessarily start processing new holders if they're already being processed (pending status)