Page MenuHomePhabricator

Fix an unusual internal cursor in Conpherence
ClosedPublic

Authored by epriestley on Mar 24 2019, 8:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 25, 7:38 AM
Unknown Object (File)
Tue, Mar 5, 4:45 AM
Unknown Object (File)
Feb 10 2024, 6:22 AM
Unknown Object (File)
Jan 16 2024, 10:45 PM
Unknown Object (File)
Dec 26 2023, 6:52 PM
Unknown Object (File)
Dec 19 2023, 2:58 AM
Unknown Object (File)
Oct 25 2023, 3:01 AM
Unknown Object (File)
Oct 19 2023, 9:49 PM
Subscribers
None

Details

Summary

See https://discourse.phabricator-community.org/t/error-when-sending-a-message-chat-room/2548.

Conpherence calls setAfterID() and setBeforeID() directly on a subquery, but these methods no longer exist.

Use a pager instead. This code probably shouldn't exist (we should use some other approach to fetch this data in most cases) but that's a larger change.

Test Plan

Sent messages in a Conpherence thread. Before: fatal; after: success. Viewed the Conphrence menu, loaded threads, etc.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

amckinley added inline comments.
src/applications/conpherence/query/ConpherenceThreadQuery.php
297

Que?

This revision is now accepted and ready to land.Mar 25 2019, 5:39 PM
src/applications/conpherence/query/ConpherenceThreadQuery.php
297

We must specify a page size to the Pager (it defaults to 100 otherwise) and Pagers don't understand "null/no limit".

No caller should be loading every transaction but I didn't actually trace everything down (since I'm pretty sure this code just needs to be removed in the future?) so 0xFFFF is just "a big number that probably won't break anything".

This revision was automatically updated to reflect the committed changes.