Page MenuHomePhabricator

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

Authored by kamil on Aug 23 2024, 5:13 AM.
Tags
None
Referenced Files
F3203090: D13150.diff
Sat, Nov 9, 7:13 PM
F3193601: D13150.id43633.diff
Fri, Nov 8, 11:06 PM
Unknown Object (File)
Fri, Nov 8, 2:09 AM
Unknown Object (File)
Fri, Nov 8, 2:09 AM
Unknown Object (File)
Fri, Nov 8, 1:42 AM
Unknown Object (File)
Fri, Oct 25, 2:37 AM
Unknown Object (File)
Sep 25 2024, 3:09 PM
Unknown Object (File)
Sep 25 2024, 12:27 AM
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.Aug 23 2024, 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.Aug 26 2024, 3:22 AM