graphql-engine/server/src-lib/Hasura
Brandon Simmons 4d2dbe68fa
Use AssertNF for leak prophylaxis when doing mutable writes. Closes #3937 (#4097)
Writing to a mutable var is a particularly potent source of leaks since
it mostly defeats GHC's analysis. Here we add assertions to all mutable
writes, and fix a couple spots where we wrote some thunks to a mutable
var (compiled with -O2).

Some of these thunks were probably benign, but others looked liked they
might be retaining big args. Didn't do much analysis, just fixed.

Actually pretty happy with how easy this was to use and as a diagnostic,
once I sorted out some issues. We should consider using it elsewhere,
and maybe extending so that we can use it with tests, enable when
`-fenable-assertsions` etc.

Relates #3388

Also simplified codepaths that use `AcceptWith`, which has unnecessary
`Maybe` fields.
2020-03-17 20:31:22 -05:00
..
Cache Add fast path for server internal metadata migrations (#3686) 2020-01-14 01:09:10 -06:00
Events Use AssertNF for leak prophylaxis when doing mutable writes. Closes #3937 (#4097) 2020-03-17 20:31:22 -05:00
GraphQL Use AssertNF for leak prophylaxis when doing mutable writes. Closes #3937 (#4097) 2020-03-17 20:31:22 -05:00
Incremental server: Fix buggy rewrite rule for Rule 2020-03-14 20:38:26 -05:00
RQL server(events): utilize proper backpressure scheme (close #3839) (#4013) 2020-03-11 11:57:31 +05:30
Server Use AssertNF for leak prophylaxis when doing mutable writes. Closes #3937 (#4097) 2020-03-17 20:31:22 -05:00
SQL allow custom mutations through actions (#3042) 2020-02-13 23:08:23 +05:30
App.hs Use AssertNF for leak prophylaxis when doing mutable writes. Closes #3937 (#4097) 2020-03-17 20:31:22 -05:00
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