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)
Sun, Mar 10, 4:32 PM
Unknown Object (File)
Feb 23 2024, 1:18 AM
Unknown Object (File)
Feb 17 2024, 10:42 PM
Unknown Object (File)
Feb 9 2024, 10:12 AM
Unknown Object (File)
Feb 3 2024, 10:49 PM
Unknown Object (File)
Feb 3 2024, 9:35 AM
Unknown Object (File)
Feb 2 2024, 6:22 AM
Unknown Object (File)
Jan 31 2024, 8:38 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
Branch
calendar1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 11584
Build 14476: Run Core Tests
Build 14475: arc lint + arc unit

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.