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
Unknown Object (File)
Mon, Nov 25, 6:22 PM
Unknown Object (File)
Mon, Nov 25, 2:48 PM
Unknown Object (File)
Thu, Nov 21, 7:39 AM
Unknown Object (File)
Sat, Nov 9, 9:02 PM
Unknown Object (File)
Sat, Nov 9, 7:13 PM
Unknown Object (File)
Fri, Nov 8, 11:06 PM
Unknown Object (File)
Fri, Nov 8, 2:09 AM
Unknown Object (File)
Fri, Nov 8, 2:09 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
No Lint Coverage
Unit
No Test Coverage

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

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