Page MenuHomePhabricator

[lib] update `processOutboundP2PMessages` to return IDs of messages queued on Tunnelbroker
ClosedPublic

Authored by kamil on Fri, Aug 23, 5:13 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Sep 15, 11:00 PM
Unknown Object (File)
Tue, Sep 10, 3:38 AM
Unknown Object (File)
Mon, Sep 9, 2:40 PM
Unknown Object (File)
Mon, Sep 9, 2:39 PM
Unknown Object (File)
Mon, Sep 9, 9:52 AM
Unknown Object (File)
Sun, Sep 8, 10:41 PM
Unknown Object (File)
Fri, Sep 6, 2:39 PM
Unknown Object (File)
Thu, Sep 5, 2:17 PM
Subscribers

Details

Summary

ENG-8423.

To implement retries, we need to track which P2P messages are sent, which are not.

This code is bad in terms of performance - for each deviceID we can create a Promise and avoid awaiting in sequence, this will be improved as a follow-up.

Depends on D13149

Test Plan

Await promise and check if IDs are returned.

Note: This stack is tested end-to-end according to the process described here.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Fri, Aug 23, 7:25 AM
tomek added inline comments.
lib/tunnelbroker/peer-to-peer-context.js
206 ↗(On Diff #43607)

We should add a code comment explaining why this function returns a promise that almost always resolves (even when all the messages fail).

This revision is now accepted and ready to land.Mon, Aug 26, 3:22 AM