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)
Wed, Dec 18, 2:25 PM
Unknown Object (File)
Wed, Dec 18, 2:25 PM
Unknown Object (File)
Wed, Dec 18, 2:25 PM
Unknown Object (File)
Wed, Dec 18, 2:25 PM
Unknown Object (File)
Wed, Dec 18, 2:25 PM
Unknown Object (File)
Fri, Nov 29, 5:20 AM
Unknown Object (File)
Fri, Nov 29, 5:04 AM
Unknown Object (File)
Nov 25 2024, 6:22 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
Branch
landing-dms
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 ↗(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