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)
Fri, Dec 27, 8:40 PM
Unknown Object (File)
Thu, Dec 12, 10:43 PM
Unknown Object (File)
Thu, Dec 12, 10:43 PM
Unknown Object (File)
Sat, Nov 30, 11:43 AM
Unknown Object (File)
Nov 26 2024, 3:47 PM
Unknown Object (File)
Nov 26 2024, 3:47 PM
Unknown Object (File)
Nov 26 2024, 6:10 AM
Unknown Object (File)
Nov 26 2024, 6:09 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
Branch
thread1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 22343
Build 30571: Run Core Tests
Build 30570: arc lint + arc unit

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.