Page MenuHomePhabricator

Account for raw limits properly in CalendarEventQuery
ClosedPublic

Authored by epriestley on Apr 7 2016, 12:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 17, 7:44 AM
Unknown Object (File)
Fri, Dec 13, 10:54 AM
Unknown Object (File)
Wed, Dec 11, 10:09 PM
Unknown Object (File)
Wed, Dec 11, 9:29 AM
Unknown Object (File)
Tue, Dec 10, 8:11 AM
Unknown Object (File)
Tue, Dec 10, 5:22 AM
Unknown Object (File)
Sun, Dec 8, 3:04 AM
Unknown Object (File)
Thu, Dec 5, 7:09 AM
Subscribers
None

Details

Summary

Fixes T8613. This was pretty straightforward, I just never dug into it originally.

rawResultLimit = 0 just means "no limit", so the fix is to only apply a limit if it is set to some nonzero value.

Also modernize a few pieces of code.

Test Plan

I'm actually not sure this can actually be hit normally? I faked setGenerateGhosts(true) into an unrelated query, hit the fatal, then fixed it.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Account for raw limits properly in CalendarEventQuery.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added reviewers: chad, lpriestley.

We should probably add a check here that requires either a limit or an end date, because otherwise you may generate infinite events. Let me add that safety test.

  • If an event generates ghosts, but has no limit and no end date, fatal so we don't generate inifnite events.
chad edited edge metadata.
This revision is now accepted and ready to land.Apr 7 2016, 1:58 PM
This revision was automatically updated to reflect the committed changes.