Page MenuHomePhabricator

Account for raw limits properly in CalendarEventQuery
ClosedPublic

Authored by epriestley on Apr 7 2016, 12:23 PM.

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.