Repository navigation
Commit 006dffc
authored
feat: remove extra Rows from ReusableRows (apache#23802)
## Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and
enhancements and this helps us generate change logs for our releases.
You can link an issue to this PR using the GitHub syntax. For example
`Closes apache#123` indicates that this PR will close issue apache#123.
-->
- Closes apache#23801
## Rationale for this change
This change reduces the peak allocated memory by removing the
unnecessary Rows from being cached.
It will only work after apache#23619
is merged, until then test_round_robin_tie_breaker_success will fail:
Error: Internal("Rows from RowCursorStream is still in use by consumer")
test
sorts::sort_preserving_merge::tests::test_round_robin_tie_breaker_success
... FAILED
The failure is triggered by prev_cursors from SortPreservingMergeStream
keeping the previous Cursor alive for round robin tie breaking purposes.
The optimization from apache#23619 only keeps the last Row, so there's no
longer a need to keep two Rows cached in ReusableRows.
## What changes are included in this PR?
<!--
There is no need to duplicate the description in the issue here but it
is sometimes worth providing a summary of the individual changes in this
PR.
-->
## Are these changes tested?
There's an existing test that currenly fails with this change and it
will pass once apache#23619 is merged
## Are there any user-facing changes?
No1 parent e16d453 commit 006dffc
1 file changed
Lines changed: 9 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
| 99 | + | |
105 | 100 | | |
106 | 101 | | |
107 | 102 | | |
108 | 103 | | |
109 | 104 | | |
110 | 105 | | |
111 | | - | |
| 106 | + | |
112 | 107 | | |
113 | 108 | | |
114 | 109 | | |
115 | 110 | | |
116 | 111 | | |
117 | 112 | | |
118 | 113 | | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
| 114 | + | |
123 | 115 | | |
124 | 116 | | |
125 | 117 | | |
126 | 118 | | |
127 | 119 | | |
128 | | - | |
| 120 | + | |
129 | 121 | | |
130 | 122 | | |
131 | 123 | | |
| |||
137 | 129 | | |
138 | 130 | | |
139 | 131 | | |
140 | | - | |
141 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
142 | 135 | | |
143 | 136 | | |
144 | 137 | | |
| |||
162 | 155 | | |
163 | 156 | | |
164 | 157 | | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
| 158 | + | |
169 | 159 | | |
170 | 160 | | |
171 | 161 | | |
| |||
0 commit comments