Don't use max int as timeout value
commit943ed1b0042206054d0789d1cead17c9ec1cec47
authorTatiana Racheva <tatianaracheva@fb.com>
Fri, 8 May 2020 07:03:33 +0000 (8 00:03 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Fri, 8 May 2020 07:05:19 +0000 (8 00:05 -0700)
tree128f23fac83bb082d9b10e4037bd6a26812d8706
parentfa52b150dc469527b9b19c09a8e93688a89ab2cd
Don't use max int as timeout value

Summary:
We observed that archive.tar files are left behind by some hh_server process. After investigating, it turned out that those were left behind by the monitor/informant because it was failing to complete the fetching of saved states.

The reason is, I set it to use max int as a timeout value, but the value is apparently not a valid OCaml integer.
The max int is `4611686018427387903`, which is then put through this code:

```
  let retries =
    float_of_int timeout /. sleep_seconds_per_retry |> int_of_float
  in
```

`retries` ends up being 0, which leads to a premature timeout of the futures that use Int.max_int as the timeout value.

Reviewed By: Wilfred

Differential Revision: D21472394

fbshipit-source-id: b4f776b271778c56fccda4bb80ea05606c0fd5c3
hphp/hack/src/server/hhMonitorInformant.ml
hphp/hack/src/server/serverLazyInit.ml
hphp/hack/src/utils/process/future.ml