Page MenuHomePhabricator

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

Authored by ashoat on Sep 14 2023, 6:11 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Aug 27, 2:40 PM
Unknown Object (File)
Mon, Aug 26, 3:53 PM
Unknown Object (File)
Sun, Aug 25, 6:37 PM
Unknown Object (File)
Sat, Aug 17, 2:52 AM
Unknown Object (File)
Jul 28 2024, 8:43 PM
Unknown Object (File)
Jul 28 2024, 8:43 PM
Unknown Object (File)
Jul 28 2024, 8:42 PM
Unknown Object (File)
Jul 28 2024, 8:38 PM
Subscribers
None

Details

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

Diff Detail

Repository
rCOMM Comm
Branch
ashoat/notifs
Lint
No Lint Coverage
Unit
No Test Coverage