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

[no-release-notes] revert second pass alloc #2680

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions server/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -558,12 +558,6 @@ func (h *Handler) resultForDefaultIter(
}
}

pollCtx, cancelF := ctx.NewSubContext()
eg.Go(func() error {
defer pan2err()
return h.pollForClosedConnection(pollCtx, c)
})

wg := sync.WaitGroup{}
wg.Add(2)

Expand Down Expand Up @@ -594,6 +588,12 @@ func (h *Handler) resultForDefaultIter(
}
})

pollCtx, cancelF := ctx.NewSubContext()
eg.Go(func() error {
defer pan2err()
return h.pollForClosedConnection(pollCtx, c)
})

// Default waitTime is one minute if there is no timeout configured, in which case
// it will loop to iterate again unless the socket died by the OS timeout or other problems.
// If there is a timeout, it will be enforced to ensure that Vitess has a chance to
Expand Down
2 changes: 1 addition & 1 deletion sql/rowexec/rel_iters.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func ProjectRow(
row sql.Row,
) (sql.Row, error) {
var fields = make(sql.Row, len(projections))
var secondPass = make([]int, 0, len(projections))
var secondPass []int
for i, expr := range projections {
// Default values that are expressions may reference other fields, thus they must evaluate after all other exprs.
// Also default expressions may not refer to other columns that come after them if they also have a default expr.
Expand Down