Reliably revive after oldifying even when workload throws
commit4dc8c999305a734c104b95629630a633356c3b4a
authorAlexander Chow <achow@fb.com>
Fri, 30 Sep 2016 09:37:07 +0000 (30 02:37 -0700)
committerHhvm Bot <hhvm-bot-bot@fb.com>
Sat, 1 Oct 2016 03:25:48 +0000 (30 20:25 -0700)
tree68e0aa2e9b7e0de77fd6be4a0f81bddae65277f5
parented4924177552526844d6540c555e840c59e4bdd5
Reliably revive after oldifying even when workload throws

Summary:
Making the oldify-revive stuff more resilient so as not to leave the shared heap in a bad state.

Details:
Currently, if the `f` in ServerIdeUtils.declare_and_check throws, the shared heap is left in a bad state for the files which were oldified but not revived. Subsequent usage of the shared heap by the typechecker will crash the server with assertion error (example: modifying a file which causes watchman to detect the file change invoke typechecking in the corrupted shared heap)

Reviewed By: dabek

Differential Revision: D3931364

fbshipit-source-id: 62f25a1481e6b506f98acf851a1f594276046e72
hphp/hack/src/server/serverIdeUtils.ml
hphp/hack/src/server/serverMain.ml