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

sql: plumb an error in the distsql planner #24688

Merged
merged 1 commit into from
Apr 12, 2018

Conversation

RaduBerinde
Copy link
Member

We got a panic inside getTypesForPlanResult via Sentry;
unfortunately I cannot reproduce the panic (I believe what triggers
it is the type of a placeholder passed during prepare, but we don't
have that information).

This change addresses a TODO to make this condition result in an error
instead of a panic.

Updates #24680.

Release note (bug fix): Converted a panic related to an unsupported
type to an error.

We got a panic inside `getTypesForPlanResult` via Sentry;
unfortunately I cannot reproduce the panic (I believe what triggers
it is the type of a placeholder passed during prepare, but we don't
have that information).

This change addresses a TODO to make this condition result in an error
instead of a panic.

Updates cockroachdb#24680.

Release note (bug fix): Converted a panic related to an unsupported
type to an error.
@RaduBerinde RaduBerinde requested review from jordanlewis and a team April 11, 2018 16:33
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@jordanlewis
Copy link
Member

Code :lgtm: but there's no test. I think this definitely needs a test.


Reviewed 2 of 2 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.


Comments from Reviewable

@RaduBerinde
Copy link
Member Author

I don't know how to cause an error in this path.. If I knew, I would fix that :)


Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.


Comments from Reviewable

@jordanlewis
Copy link
Member

Ah I didn't realize you mentioned that in the PR description.

cc @justinj, didn't you add some testing around this recently? If this method isn't tested for completeness over all types, it should be. Are you aware of any times that don't have an output for this method?

@justinj
Copy link
Contributor

justinj commented Apr 11, 2018

Hm, yeah, I did add a test for DatumTypeToColumnType, by that test it certainly covers everything in types.AnyNonArray (and it also covers arrays), so I'm also not sure what could have caused this.

@jordanlewis
Copy link
Member

well, shrug. :lgtm:


Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.


Comments from Reviewable

@RaduBerinde
Copy link
Member Author

bors ¯\_(ツ)_/¯

I mean,

bors r+


Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.


Comments from Reviewable

@craig
Copy link
Contributor

craig bot commented Apr 11, 2018

Build failed (retrying...)

craig bot pushed a commit that referenced this pull request Apr 12, 2018
24683: stats: consolidate the stat and histo caches r=RaduBerinde a=RaduBerinde

The stats cache was implemented as a pair of caches: one where each
entry is a table, holding all the stats but without histograms; and
another which holds individual histograms. The idea here was that
histograms are bigger so we would be able to store more table stats if
we limited the number of histograms in the cache.

Unfortunately, this interface is problematic to use when we will add
code to automatically remove old stats: in-between getting the stats
and getting a corresponding histogram, the stat can disappear leading
to an error. Another problem is that with a cold cache, we do a
separate query for each histogram.

Simplifying to a single cache that stores all the stats, including
histograms. We can revisit this later if we find that we need a large
cache size and memory usage becomes a problem.

Plus a minor improvement: we now return the TableStatistics in
new-to-old order.

Release note: None

24688: sql: plumb an error in the distsql planner r=RaduBerinde a=RaduBerinde

We got a panic inside `getTypesForPlanResult` via Sentry;
unfortunately I cannot reproduce the panic (I believe what triggers
it is the type of a placeholder passed during prepare, but we don't
have that information).

This change addresses a TODO to make this condition result in an error
instead of a panic.

Updates #24680.

Release note (bug fix): Converted a panic related to an unsupported
type to an error.

24691: workloadccl/allccl: skip tpcc validation test under testshort and testrace r=danhhz a=danhhz

It loads a lot of data and so it takes too long to run under short or
race tests. Cutting the data down would make the test uninteresting
since the whole point of the test is to check that the validation
function agrees with the initial data generation, so just skip it in
these cases.

Closes #24660 #24659

Release note: None

Co-authored-by: Radu Berinde <radu@cockroachlabs.com>
Co-authored-by: Daniel Harrison <daniel.harrison@gmail.com>
@craig
Copy link
Contributor

craig bot commented Apr 12, 2018

Build succeeded

@craig craig bot merged commit 853ebb0 into cockroachdb:master Apr 12, 2018
@RaduBerinde RaduBerinde deleted the get-types-err branch April 12, 2018 12:46
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.

None yet

4 participants