Page MenuHomePhabricator

Calendar has cursor paging issue on import sources
Closed, ResolvedPublic

Description

Not sure exactly where this is coming from but it's not desirable:

Screen Shot 2016-11-01 at 1.41.31 PM.png (965×1 px, 87 KB)

Revisions and Commits

Restricted Differential Revision
Restricted Differential Revision

Event Timeline

Here's the trace:

[Tue Nov 01 20:41:24.023333 2016] [:error] [pid 18658] [client 172.30.0.192:7597] [2016-11-01 20:41:24] EXCEPTION: (Exception) Cursor "1118" does not identify a valid object in query "PhabricatorCalendarEventQuery". at [<phabricator>/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:431]
[Tue Nov 01 20:41:24.023963 2016] [:error] [pid 18658] [client 172.30.0.192:7597] arcanist(head=master, ref.master=fad85844314b), libcore(), phabricator(head=master, ref.master=3e15e0b9806b), phutil(head=master, ref.master=2b7b1007bf87), services(head=master, ref.master=c2aefbcd155e)
[Tue Nov 01 20:41:24.023974 2016] [:error] [pid 18658] [client 172.30.0.192:7597]   #0 <#2> PhabricatorCursorPagedPolicyAwareQuery::loadCursorObject(string) called at [<phabricator>/src/applications/calendar/query/PhabricatorCalendarEventQuery.php:138]
[Tue Nov 01 20:41:24.023989 2016] [:error] [pid 18658] [client 172.30.0.192:7597]   #1 <#2> PhabricatorCalendarEventQuery::getPagingValueMap(string, array) called at [<phabricator>/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:373]
[Tue Nov 01 20:41:24.023993 2016] [:error] [pid 18658] [client 172.30.0.192:7597]   #2 <#2> PhabricatorCursorPagedPolicyAwareQuery::buildPagingClause(AphrontMySQLiDatabaseConnection) called at [<phabricator>/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:283]
[Tue Nov 01 20:41:24.023997 2016] [:error] [pid 18658] [client 172.30.0.192:7597]   #3 <#2> PhabricatorCursorPagedPolicyAwareQuery::buildWhereClauseParts(AphrontMySQLiDatabaseConnection) called at [<phabricator>/src/applications/calendar/query/PhabricatorCalendarEventQuery.php:354]
[Tue Nov 01 20:41:24.024000 2016] [:error] [pid 18658] [client 172.30.0.192:7597]   #4 <#2> PhabricatorCalendarEventQuery::buildWhereClauseParts(AphrontMySQLiDatabaseConnection) called at [<phabricator>/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:273]
[Tue Nov 01 20:41:24.024004 2016] [:error] [pid 18658] [client 172.30.0.192:7597]   #5 <#2> PhabricatorCursorPagedPolicyAwareQuery::buildWhereClause(AphrontMySQLiDatabaseConnection) called at [<phabricator>/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:96]
[Tue Nov 01 20:41:24.024007 2016] [:error] [pid 18658] [client 172.30.0.192:7597]   #6 <#2> PhabricatorCursorPagedPolicyAwareQuery::loadStandardPageRows(PhabricatorCalendarEvent) called at [<phabricator>/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:82]
[Tue Nov 01 20:41:24.024010 2016] [:error] [pid 18658] [client 172.30.0.192:7597]   #7 <#2> PhabricatorCursorPagedPolicyAwareQuery::loadStandardPage(PhabricatorCalendarEvent) called at [<phabricator>/src/applications/calendar/query/PhabricatorCalendarEventQuery.php:157]
[Tue Nov 01 20:41:24.024014 2016] [:error] [pid 18658] [client 172.30.0.192:7597]   #8 <#2> PhabricatorCalendarEventQuery::loadPage() called at [<phabricator>/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php:236]
[Tue Nov 01 20:41:24.024017 2016] [:error] [pid 18658] [client 172.30.0.192:7597]   #9 <#2> PhabricatorPolicyAwareQuery::execute() called at [<phabricator>/src/applications/calendar/import/PhabricatorCalendarImportEngine.php:558]
[Tue Nov 01 20:41:24.024020 2016] [:error] [pid 18658] [client 172.30.0.192:7597]   #10 <#2> PhabricatorCalendarImportEngine::canDeleteAnyEvents(PhabricatorUser, PhabricatorCalendarImport) called at [<phabricator>/src/applications/calendar/controller/PhabricatorCalendarImportViewController.php:138]
[Tue Nov 01 20:41:24.024023 2016] [:error] [pid 18658] [client 172.30.0.192:7597]   #11 <#2> PhabricatorCalendarImportViewController::buildCurtain(PhabricatorCalendarImport) called at [<phabricator>/src/applications/calendar/controller/PhabricatorCalendarImportViewController.php:30]
[Tue Nov 01 20:41:24.024027 2016] [:error] [pid 18658] [client 172.30.0.192:7597]   #12 <#2> PhabricatorCalendarImportViewController::handleRequest(AphrontRequest) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:257]
[Tue Nov 01 20:41:24.024030 2016] [:error] [pid 18658] [client 172.30.0.192:7597]   #13 phlog(Exception) called at [<phabricator>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41]
[Tue Nov 01 20:41:24.024033 2016] [:error] [pid 18658] [client 172.30.0.192:7597]   #14 PhabricatorDefaultRequestExceptionHandler::handleRequestException(AphrontRequest, Exception) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:671]
[Tue Nov 01 20:41:24.024037 2016] [:error] [pid 18658] [client 172.30.0.192:7597]   #15 AphrontApplicationConfiguration::handleException(Exception) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:262]
[Tue Nov 01 20:41:24.024044 2016] [:error] [pid 18658] [client 172.30.0.192:7597]   #16 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:169]
[Tue Nov 01 20:41:24.024047 2016] [:error] [pid 18658] [client 172.30.0.192:7597]   #17 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phabricator>/webroot/index.php:17]

I can't reproduce this locally and I'm not really sure what's up (bad/weird import, maybe? But no issues importing the same source locally), so I'm just going to cheat my way through it at least for the moment.

epriestley added a revision: Restricted Differential Revision.Nov 1 2016, 8:59 PM
epriestley closed this task as Resolved by committing Restricted Diffusion Commit.Nov 1 2016, 9:40 PM
epriestley added a commit: Restricted Diffusion Commit.

That changed the stack trace but didn't fix the issue so I probably need to not cheat.

It seems that we're somehow importing events so they end up as their own parents.

epriestley claimed this task.

I "fixed" this by deleting the data more aggressively and reloading the import. I couldn't reproduce this locally so I think it was a transient issue with an older import bug.

I finally got this reproducing locally, at least.

epriestley added a revision: Restricted Differential Revision.Nov 2 2016, 6:34 PM
epriestley added a commit: Restricted Diffusion Commit.Nov 2 2016, 6:44 PM

This appears to legitimately be fixed, now.