Page MenuHomePhabricator

[lib] Add action type for processing holders
Needs RevisionPublic

Authored by bartek on Fri, Sep 20, 6:21 AM.
Tags
None
Referenced Files
F2786162: D13408.diff
Fri, Sep 20, 10:33 PM
F2783723: D13408.id44371.diff
Fri, Sep 20, 5:53 PM
F2783682: D13408.id.diff
Fri, Sep 20, 5:38 PM
F2783577: D13408.diff
Fri, Sep 20, 5:17 PM
F2779803: D13408.id.diff
Fri, Sep 20, 1:17 PM
F2779650: D13408.id44371.diff
Fri, Sep 20, 12:25 PM
F2779575: D13408.diff
Fri, Sep 20, 12:07 PM
F2779276: D13408.id44371.diff
Fri, Sep 20, 10:08 AM
Subscribers

Details

Reviewers
kamil
tomek
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

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
7

nit: I would remove StoreEstablishedHolderPayload and use BlobHashAndHolder directly

14–23
lib/reducers/holder-reducer.js
63

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