mirror: add implementation docs for network_log (#1608)

Summary:
Follow-up to #1562. These docs are not user-facing.

Test Plan:
None.

wchargin-branch: mirror-network-log-impldocs
This commit is contained in:
William Chargin 2020-02-08 08:57:53 -08:00 committed by GitHub
parent f924521fdd
commit 8c47dd1c14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -175,6 +175,15 @@ export class Mirror {
* node is the same as subsequent fetches (a simple SQL `UPDATE`
* instead of first requiring an existence check).
*
* A table `network_log` logs all GraphQL requests made by this module
* and their corresponding responses, as well as the update created
* from the response. This is for debugging. For example, if a node in
* the database is corrupt in some way, inspecting the network log
* will show exactly which queries caused it to enter its broken
* state. In theory, it should be possible to replay the network log
* to re-create the database state exactly, though no tooling exists
* to do so automatically.
*
* Finally, a table `meta` is used to store metadata about the mirror
* itself. This is used to make sure that the mirror is not loaded
* with an incompatible version of the code or schema. It is never