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
F4108438: D13150.diff
Mon, Feb 17, 3:51 PM
Unknown Object (File)
Jan 15 2025, 8:14 AM
Unknown Object (File)
Jan 5 2025, 8:20 AM
Unknown Object (File)
Jan 5 2025, 8:18 AM
Unknown Object (File)
Jan 5 2025, 8:17 AM
Unknown Object (File)
Jan 5 2025, 4:17 AM
Unknown Object (File)
Dec 18 2024, 2:25 PM
Unknown Object (File)
Dec 18 2024, 2:25 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