graphql-engine/docs
Auke Booij 7bead93827 server: remove remnants of query plan caching (fix #1795)
Query plan caching was introduced by - I believe - hasura/graphql-engine#1934 in order to reduce the query response latency. During the development of PDV in hasura/graphql-engine#4111, it was found out that the new architecture (for which query plan caching wasn't implemented) performed comparably to the pre-PDV architecture with caching. Hence, it was decided to leave query plan caching until some day in the future when it was deemed necessary.

Well, we're in the future now, and there still isn't a convincing argument for query plan caching. So the time has come to remove some references to query plan caching from the codebase. For the most part, any code being removed would probably not be very well suited to the post-PDV architecture of query execution, so arguably not much is lost.

Apart from simplifying the code, this PR will contribute towards making the GraphQL schema generation more modular, testable, and easier to profile. I'd like to eventually work towards a situation in which it's easy to generate a GraphQL schema parser *in isolation*, without being connected to a database, and then parse a GraphQL query *in isolation*, without even listening any HTTP port. It is important that both of these operations can be examined in detail, and in isolation, since they are two major performance bottlenecks, as well as phases where many important upcoming features hook into.

Implementation

The following have been removed:
- The entirety of `server/src-lib/Hasura/GraphQL/Execute/Plan.hs`
- The core phases of query parsing and execution no longer have any references to query plan caching. Note that this is not to be confused with query *response* caching, which is not affected by this PR. This includes removal of the types:
- - `Opaque`, which is replaced by a tuple. Note that the old implementation was broken and did not adequately hide the constructors.
- - `QueryReusability` (and the `markNotReusable` method). Notably, the implementation of the `ParseT` monad now consists of two, rather than three, monad transformers.
- Cache-related tests (in `server/src-test/Hasura/CacheBoundedSpec.hs`) have been removed .
- References to query plan caching in the documentation.
- The `planCacheOptions` in the `TenantConfig` type class was removed. However, during parsing, unrecognized fields in the YAML config get ignored, so this does not cause a breaking change. (Confirmed manually, as well as in consultation with @sordina.)
- The metrics no longer send cache hit/miss messages.

There are a few places in which one can still find references to query plan caching:

- We still accept the `--query-plan-cache-size` command-line option for backwards compatibility. The `HASURA_QUERY_PLAN_CACHE_SIZE` environment variable is not read.

https://github.com/hasura/graphql-engine-mono/pull/1815

GitOrigin-RevId: 17d92b254ec093c62a7dfeec478658ede0813eb7
2021-07-27 11:52:43 +00:00
..
_ext docs: update to latest urls in sitemap (#651) 2021-02-23 18:57:27 +00:00
_static docs: remove feedback section 2021-07-26 09:37:08 +00:00
_theme/djangodocs docs: remove feedback section 2021-07-26 09:37:08 +00:00
algolia_index pep8 fixes for python files (#875) 2018-10-30 14:51:58 +05:30
graphql server: remove remnants of query plan caching (fix #1795) 2021-07-27 11:52:43 +00:00
img docs: refactor API security docs 2021-07-26 14:10:35 +00:00
.gitignore server: support restified versions of graphql queries (#303) 2021-01-29 01:03:35 +00:00
.python-version docs: console / cli / api workflows (close #3593) (#4948) 2020-10-13 11:07:46 +00:00
404.rst docs: move cloud docs (#5411) 2020-08-25 17:23:25 +05:30
conf.py docs: favicon change 2021-02-10 08:19:05 +00:00
CONTRIBUTING.md Fix case of GitHub 2020-11-17 19:29:41 +05:30
index.rst docs: update paths for core and cloud (#5665) 2020-08-25 21:51:21 +05:30
Makefile docs: fix sitemap generation (#5490) 2020-07-31 14:51:13 +05:30
README.md noop: replace subdomain links with subpath (#3869) 2020-02-27 15:43:07 +05:30
requirements.txt docs: bump MarkupSafe version (#4102) 2020-03-13 13:58:54 +05:30

Hasura GraphQL Engine Docs

The documentation accompanying the Hasura GraphQL engine is written with Sphinx and deployed to hasura.io/docs.

Contributing

Check out the contributing guide for more details.

License

The source code in this directory are under MIT License.