graphql-engine/server/src-lib/Hasura
Vamshi Surabhi c52bfc540d
More robust forking, exception safety. Closes #3768 (#3860)
This is the result of a general audit of how we fork threads, with a
detour into how we're using mutable state especially in websocket
codepaths, making more robust to async exceptions and exceptions
resulting from bugs.

Some highlights:
- use a wrapper around 'immortal' so threads that die due to bugs are
  restarted, and log the error
- use 'withAsync' some places
- use bracket a few places where we might break invariants
- log some codepaths that represent bugs
- export UnstructuredLog for ad hoc logging (the alternative is we
  continue not logging useful stuff)

I had to timebox this. There are a few TODOs I didn't want to address.
And we'll wait until this is merged to attempt #3705 for
Control.Concurrent.Extended
2020-03-05 23:29:26 +05:30
..
Cache Add fast path for server internal metadata migrations (#3686) 2020-01-14 01:09:10 -06:00
Events More robust forking, exception safety. Closes #3768 (#3860) 2020-03-05 23:29:26 +05:30
GraphQL More robust forking, exception safety. Closes #3768 (#3860) 2020-03-05 23:29:26 +05:30
Incremental allow custom mutations through actions (#3042) 2020-02-13 23:08:23 +05:30
RQL allow custom mutations through actions (#3042) 2020-02-13 23:08:23 +05:30
Server More robust forking, exception safety. Closes #3768 (#3860) 2020-03-05 23:29:26 +05:30
SQL allow custom mutations through actions (#3042) 2020-02-13 23:08:23 +05:30
App.hs More robust forking, exception safety. Closes #3768 (#3860) 2020-03-05 23:29:26 +05:30
Cache.hs allow specifying an upper limit on the query plan cache size (#3012) 2019-11-25 11:12:23 -06:00
Db.hs incremental metadata: Clean up a few lingering loose ends 2020-01-08 17:19:03 -06:00
EncJSON.hs save permissions, relationships and collections in catalog with 'is_system_defined' explicitly (#3165) 2019-10-21 11:01:05 -05:00
HTTP.hs server: Parameterize the graphql-engine library over the version (#3668) 2020-01-22 15:55:55 -06:00
Incremental.hs Build the GraphQL context after pruning dangling dependents 2020-01-30 18:17:29 -06:00
Logging.hs More robust forking, exception safety. Closes #3768 (#3860) 2020-03-05 23:29:26 +05:30
Prelude.hs More robust forking, exception safety. Closes #3768 (#3860) 2020-03-05 23:29:26 +05:30