HomePhabricator
Diffusion Comm e8043a84cc5a

[keyserver] Don't send empty ID cleanup query in notifs code

Description

[keyserver] Don't send empty ID cleanup query in notifs code

Summary:
I introduced a regression in D9175. The issue is detailed in this Linear comment thread, but basically there's a possibility of dbIDs being non-empty when it's checked, but empty by the time the query is run.

The core issue here is that we're not waiting for the code that dequeues from dbIDs to complete before checking (and running) the cleanup query. This diff makes sure we wait until deliveryPromises are all resolved before checking and running the cleanup query.

Test Plan: I was able to repro the issue in my local environment before this diff (see Linear comment thread). After this diff, the issue no longer repro'd

Reviewers: michal, marcin, tomek

Reviewed By: marcin, tomek

Differential Revision: https://phab.comm.dev/D9201

Details

Provenance
ashoatAuthored on Sep 14 2023, 6:08 AM
Reviewer
marcin
Differential Revision
D9201: [keyserver] Don't send empty ID cleanup query in notifs code
Parents
rCOMM32c6aa104750: [terraform] Add Tunnelbroker
Branches
Unknown
Tags
Unknown