Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

distsqlrun: explain(distsql) queries w/ fragment #27858

Merged
merged 1 commit into from
Jul 23, 2018

Conversation

jordanlewis
Copy link
Member

Previously, explain(distsql) emitted a URL that used the query string to
send the compressed plan data to cockroachdb.github.io. This was
unideal, as query strings are transmitted to the server, but these query
strings might contain compressed, sensitive data.

Now, the query string is sent in the URL fragment, which is kept on the
client side by the browser.

Release note: None

@jordanlewis jordanlewis requested review from solongordon, asubiotto, RaduBerinde and a team July 23, 2018 19:24
@jordanlewis jordanlewis requested a review from a team as a code owner July 23, 2018 19:24
@jordanlewis jordanlewis requested review from a team July 23, 2018 19:24
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Previously, explain(distsql) emitted a URL that used the query string to
send the compressed plan data to cockroachdb.github.io. This was
unideal, as query strings are transmitted to the server, but these query
strings might contain compressed, sensitive data.

Now, the query string is sent in the URL fragment, which is kept on the
client side by the browser.

Release note: None
@jordanlewis
Copy link
Member Author

I (accidentally) pushed a change directly to cockroachdb.github.io that permits both forms of the URL. Meant to send a PR but I hadn't set up a fork. cockroachdb/cockroachdb.github.io@9b60ce3

The only change I manually made in this PR was to change the output URL to use Fragment instead of RawQuery. The rest were done with a sed that replaced decode.html? with decode.html#.

@RaduBerinde
Copy link
Member

This is very cool! Great idea! LGTM

I just looked at your commit in that other repo, that also LGTM.

@jordanlewis
Copy link
Member Author

Thanks for the quick review!

@jordanlewis
Copy link
Member Author

bors r+

craig bot pushed a commit that referenced this pull request Jul 23, 2018
27809: importccl: pre-read schemas in mysqldump import r=dt a=dt

This switches mysqldump import to use read schemas from during setup on
the gateway, rather than during sampling, similar to how pgdump operates
(i.e. in three passes over the input rather than two).

This simplifies handling foreign keys, which can sometimes appear in
a table definition before the table they reference — making them hard to
correctly resolve immediately. Reading though the whole file to capture
all the schemas before evaluating them should make that a bit easier.

In the future, a return to 2-pass could be possible either if it turns
out that KVs can be produced correctly even if the schema is later
changed by a foreign key, or by oversampling raw rows of the input
*without* converting during the read extracting the schemas, then using
those schemas to convert the sampled rows to KVs from which the splits
can be sampled.

Release note: none.

27858: distsqlrun: explain(distsql) queries w/ fragment r=jordanlewis a=jordanlewis

Previously, explain(distsql) emitted a URL that used the query string to
send the compressed plan data to cockroachdb.github.io. This was
unideal, as query strings are transmitted to the server, but these query
strings might contain compressed, sensitive data.

Now, the query string is sent in the URL fragment, which is kept on the
client side by the browser.

Release note: None

Co-authored-by: David Taylor <[email protected]>
Co-authored-by: Jordan Lewis <[email protected]>
@craig
Copy link
Contributor

craig bot commented Jul 23, 2018

Build succeeded

@craig craig bot merged commit 755f111 into cockroachdb:master Jul 23, 2018
@jordanlewis jordanlewis deleted the frag-plan branch July 24, 2018 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants