Page MenuHomePhabricator

[keyserver] Revert D4675 window function for getMessageInfos
ClosedPublic

Authored by ashoat on Aug 10 2022, 12:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Sep 26, 11:29 PM
Unknown Object (File)
Thu, Sep 26, 11:29 PM
Unknown Object (File)
Thu, Sep 26, 11:29 PM
Unknown Object (File)
Thu, Sep 26, 11:26 PM
Unknown Object (File)
Aug 30 2024, 2:02 PM
Unknown Object (File)
Aug 27 2024, 3:00 PM
Unknown Object (File)
Aug 21 2024, 3:04 AM
Unknown Object (File)
Aug 21 2024, 2:05 AM

Details

Summary

See context on Linear. The new query behaves differently from the old query for messages that have multiple associated uploads. We want to return 20 distinct messages, not 20 rows.

There might be a way to keep the window function construction, but I don't have time right now to investigate. The old query is definitely messier than the new one, but the performance is approximately the same after D4674 and D4673.

Test Plan

I ran the old query on MariaDB in production and confirmed it works, returns the right number of rows, and has approximately the same performance as the new query

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable