Page MenuHomePhabricator

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

Authored by ashoat on Sep 14 2023, 6:11 AM.
Referenced Files
Unknown Object (File)
Mon, Jun 17, 6:12 PM
Unknown Object (File)
Wed, Jun 12, 10:11 AM
Unknown Object (File)
Tue, Jun 11, 12:39 PM
Unknown Object (File)
May 19 2024, 12:19 AM
Unknown Object (File)
May 3 2024, 12:38 AM
Unknown Object (File)
May 3 2024, 12:37 AM
Unknown Object (File)
May 3 2024, 12:34 AM
Unknown Object (File)
May 2 2024, 10:01 PM



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

Diff Detail

rCOMM Comm
Lint Not Applicable
Tests Not Applicable