sql: make crdb_internal.check_consistency a table generator#36320
Conversation
tbg
left a comment
There was a problem hiding this comment.
Reviewed 4 of 4 files at r1, 3 of 3 files at r2.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @andreimatei)
docs/generated/sql/functions.md, line 650 at r1 (raw file):
<thead><tr><th>Function → Returns</th><th>Description</th></tr></thead> <tbody> <tr><td><code>crdb_internal.check_consistency(stats_only: <a href="bool.html">bool</a>, start_key: <a href="bytes.html">bytes</a>, end_key: <a href="bytes.html">bytes</a>) → tuple{int AS range_id, bytes AS start_key, string AS start_key_pretty, string AS status, string AS detail}</code></td><td><span class="funcdesc"><p>Runs a consistency check on ranges touching the specified key range. an empty start or end key is treated as the minimum and maximum possible, respectively. stats_only should only be set to false when targeting a small number of ranges to avoid overloading the cluster. The return value is an array of tuples, with each tuple consisting of the range ID, the status (a roachpb.CheckConsistencyResponse_Status), and verbose detail.</p>
Isn't it weird that this is now documented here?
pkg/sql/sem/builtins/generator_builtins.go, line 198 at r1 (raw file):
"an empty start or end key is treated as the minimum and maximum possible, "+ "respectively. stats_only should only be set to false when targeting a "+ "small number of ranges "+"to avoid overloading the cluster. The return "+
weird concat when you don't have a newline
Generate rows instead of an array of tuples. Much easier to use. Release note: None
So it doesn't need to go through a Txn just to get a DB. Release note: None
74753fe to
8315306
Compare
andreimatei
left a comment
There was a problem hiding this comment.
bors r+
Reviewable status:
complete! 1 of 0 LGTMs obtained (waiting on @tbg)
docs/generated/sql/functions.md, line 650 at r1 (raw file):
Previously, tbg (Tobias Grieger) wrote…
Isn't it weird that this is now documented here?
good eye. Massaged it to move back to the sys functions.
pkg/sql/sem/builtins/generator_builtins.go, line 198 at r1 (raw file):
Previously, tbg (Tobias Grieger) wrote…
weird concat when you don't have a newline
done
Build succeeded |
Generate rows instead of an array of tuples. Much easier to use.
Release note: None