feat: remove extra Rows from ReusableRows - #23802
Conversation
|
Hi @ariel-miculas Thank you for working on this. Can you look into the ci failures. |
|
@kumarUjjawal the CI failures are expected and the tests will pass once #23619 is merged |
Fixes: apache#23801 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.
7f03b3b to
d50a09a
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #23802 +/- ##
==========================================
+ Coverage 81.13% 81.19% +0.05%
==========================================
Files 1112 1110 -2
Lines 386716 388734 +2018
Branches 386716 388734 +2018
==========================================
+ Hits 313765 315618 +1853
- Misses 54479 54529 +50
- Partials 18472 18587 +115 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
All the tests have passed, updates to the reservation are not required since the spare |
|
@kumarUjjawal could you please have a look? |
| @@ -96,36 +96,28 @@ impl FusedStreams { | |||
| /// A pair of `Arc<Rows>` that can be reused | |||
|
run benchmark sort_tpch |
|
Very nice, looks much better now |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing remove-extra-rows-in-reusable-rows (12db718) to 186f96f (merge-base) diff Run configurationrun benchmark sort_tpchResults will be posted here when complete File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Instance: Comparing remove-extra-rows-in-reusable-rows (12db718) to 186f96f (merge-base) diff Run configurationrun benchmark sort_tpchCPU Details (lscpu)Details
Resource Usagesort_tpch — base (merge-base)
sort_tpch — branch
File an issue against this benchmark runner |
|
I think we need peak_memory per query to see the improvement. |
Which issue does this PR close?
Rationale for this change
This change reduces the peak allocated memory by removing the unnecessary Rows from being cached.
It will only work after #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 #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?
Are these changes tested?
There's an existing test that currenly fails with this change and it will pass once #23619 is merged
Are there any user-facing changes?
No