-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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: pool TableReaders #30676
Conversation
aa0f5ce
to
a69b1a3
Compare
|
This is kind of weird - I can't reproduce the CI failure locally. |
a69b1a3
to
3fbf2c8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! 0 of 0 LGTMs obtained
pkg/sql/distsqlrun/processors.go, line 163 at r1 (raw file):
} } else { h.outputTypes = types
I think this might be what the crash is about. Here we're using the given types
directly.
[nit] also add a comment in this block // No projection or renders.
, it's hard to see the high level logic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! 0 of 0 LGTMs obtained
pkg/sql/distsqlrun/processors.go, line 66 at r1 (raw file):
renderExprs []exprHelper // outputCols is set if we have a projection. Only one of renderExprs and // outputCols can have length > 0.
[nit] 0-length projections are possible, which would be an empty non-nil outputCols
. Can you add that information in a comment here? And say is not nil
instead of length > 0
in these comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! 0 of 0 LGTMs obtained
pkg/sql/distsqlrun/processors.go, line 66 at r1 (raw file):
Previously, RaduBerinde wrote…
[nit] 0-length projections are possible, which would be an empty non-nil
outputCols
. Can you add that information in a comment here? And sayis not nil
instead oflength > 0
in these comments
Hmm, I didn't realize that. That makes getting this code right harder. I think we'll need to store a boolean then, because now there's no way to distinguish empty renderExprs caused by the pool trying to retain slice memory, vs empty renderExprs caused by a 0 length projection.
pkg/sql/distsqlrun/processors.go, line 163 at r1 (raw file):
Previously, RaduBerinde wrote…
I think this might be what the crash is about. Here we're using the given
types
directly.[nit] also add a comment in this block
// No projection or renders.
, it's hard to see the high level logic
done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! 0 of 0 LGTMs obtained
pkg/sql/distsqlrun/processors.go, line 66 at r1 (raw file):
Previously, jordanlewis (Jordan Lewis) wrote…
Hmm, I didn't realize that. That makes getting this code right harder. I think we'll need to store a boolean then, because now there's no way to distinguish empty renderExprs caused by the pool trying to retain slice memory, vs empty renderExprs caused by a 0 length projection.
Oh, wait, I see, this only matters for outputCols
, which we aren't trying to save the memory of.
9f6311b
to
05afe11
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! 0 of 0 LGTMs obtained (and 1 stale)
pkg/sql/distsqlrun/processors.go, line 66 at r1 (raw file):
Previously, jordanlewis (Jordan Lewis) wrote…
Oh, wait, I see, this only matters for
outputCols
, which we aren't trying to save the memory of.
Can you explicitly mention that 0-length projections are possible, in which case outputCols has length 0 but is not nil.
Done. TFTR! |
And permit ProcOutputHelper and ProcessorBase to be reset without throwing away all slice memory. Release note: None
bors r+ |
30676: distsqlrun: pool TableReaders r=jordanlewis a=jordanlewis And permit ProcOutputHelper and ProcessorBase to be reset without throwing away all slice memory. Extracted from #30556. Release note: None Co-authored-by: Jordan Lewis <[email protected]>
Build succeeded |
And permit ProcOutputHelper and ProcessorBase to be reset without
throwing away all slice memory.
Extracted from #30556.
Release note: None