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

distsql: the Context used for expression evaluation (EvalCtx.Ctx) is wrong #15670

Closed
andreimatei opened this issue May 3, 2017 · 6 comments
Closed
Assignees
Labels
A-sql-execution Relating to SQL execution. C-cleanup Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.

Comments

@andreimatei
Copy link
Contributor

As indicated by the TODO here: https://github.com/cockroachdb/cockroach/blob/549631b/pkg/sql/distsqlrun/server.go#L180

Each processor that needs to evaluate expressions should initialize the Ctx inside the EvalCtx. This would probably be made easier by making the EvalCtx immutable and passing it by value more.

@andreimatei andreimatei added this to the 1.1 milestone May 3, 2017
@andreimatei andreimatei self-assigned this May 3, 2017
@cuongdo cuongdo modified the milestones: 1.2, 1.1 Jul 7, 2017
@cuongdo
Copy link
Contributor

cuongdo commented Jul 7, 2017

This still seems important and should be done earlier, to avoid another last-minute scramble. Is this doable for 1.1?

@andreimatei
Copy link
Contributor Author

I don't know how much work it is to fix this, I have to look at the code. But I don't think it's a particularly big deal; I think this just affects the log messages from expression evaluation.

@RaduBerinde RaduBerinde modified the milestones: 1.2, 1.1 Jul 11, 2017
@RaduBerinde
Copy link
Member

Ah, from the description it seemed that this is about an EvalContext being wrong, but it's about a context.Context, so it's not really that important. Moving to 1.2.

@RaduBerinde RaduBerinde changed the title distsql: the EvalCtx.Ctx used for expression evaluation is wrong distsql: the Context used for expression evaluation (EvalCtx.Ctx) is wrong Jul 11, 2017
@RaduBerinde RaduBerinde changed the title distsql: the Context used for expression evaluation (EvalCtx.Ctx) is wrong distsql: the Context used for expression evaluation (EvalCtx.Ctx) is wrong Jul 11, 2017
@andreimatei andreimatei modified the milestones: 2.0, 2.1 Feb 26, 2018
@knz knz added A-sql-semantics A-sql-execution Relating to SQL execution. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. S-2-temp-unavailability Temp crashes or other availability problems. Can be worked around or resolved by restarting. labels Apr 27, 2018
@jordanlewis
Copy link
Member

Seems out of date - either fixed or different now. Closing.

@jordanlewis jordanlewis added the X-invalid Closed as unable to reproduce, not actually an issue, etc. label Apr 30, 2018
@andreimatei
Copy link
Contributor Author

Why does it seem out of date or different? If you look for uses of evalCtx.Ctx() in distsql you find plenty - e.g.

ctx := s.evalCtx.Ctx()

Also all the expression evaluation done by DistSQL.

@andreimatei andreimatei reopened this Apr 30, 2018
@jordanlewis jordanlewis removed the X-invalid Closed as unable to reproduce, not actually an issue, etc. label Apr 30, 2018
@jordanlewis jordanlewis added C-cleanup Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior. and removed S-2-temp-unavailability Temp crashes or other availability problems. Can be worked around or resolved by restarting. labels Aug 21, 2018
@jordanlewis jordanlewis removed the C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. label Aug 21, 2018
@andreimatei andreimatei removed this from the 2.1 milestone Oct 2, 2018
@andreimatei
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-execution Relating to SQL execution. C-cleanup Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.
Projects
None yet
Development

No branches or pull requests

6 participants