Page MenuHomePhabricator

Fix an unusual internal cursor in Conpherence
ClosedPublic

Authored by epriestley on Mar 24 2019, 8:58 PM.
Tags
None
Referenced Files
F14101096: D20318.id48479.diff
Tue, Nov 26, 3:47 PM
F14101094: D20318.id48473.diff
Tue, Nov 26, 3:47 PM
F14096948: D20318.id.diff
Tue, Nov 26, 6:10 AM
F14096942: D20318.diff
Tue, Nov 26, 6:09 AM
Unknown Object (File)
Wed, Nov 20, 7:37 AM
Unknown Object (File)
Sat, Nov 16, 1:43 AM
Unknown Object (File)
Tue, Nov 12, 8:35 AM
Unknown Object (File)
Fri, Nov 8, 7:01 AM
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.