Repository navigation
[opt](cloud) Add recycler rowset recycling benchmarks test - #68043
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
f10532e to
29cd37b
Compare
|
run buildall |
b5e19dc to
5df96b4
Compare
|
run buildall |
Cloud UT Coverage ReportIncrement line coverage Increment coverage report
|
a590ae9 to
25f0ef2
Compare
|
run cloudut |
Cloud UT Coverage ReportIncrement line coverage Increment coverage report
|
970b682 to
444e884
Compare
444e884 to
34c769f
Compare
There was a problem hiding this comment.
Request changes. The non-versioned status change is reasonable, but the same legacy shape is still treated as an error on active multi-version paths, and the benchmark integration has three determinism/portability problems.
Critical checkpoint conclusions:
- Goal and test proof: the non-versioned branch is covered; the multi-version dropped-tablet path remains incomplete and untested.
- Scope, parallel paths, and compatibility: the production edit is small, but parallel versioned handlers were missed; there is no wire/storage-format change.
- Concurrency and lifecycle: worker-pool draining, vector ownership, real-S3 accessor precedence, and GUID-rooted cleanup look sound; no new lock, deadlock, or static-lifetime issue was found.
- Persistence and deletion: the missed tablet path exits before its local range removal and can delay dropped-metadata cleanup until the separate legacy-expiration sweep.
- Configuration and protocol: there are no production config or FE/BE variable changes; benchmark-only environment settings do not require runtime propagation.
- Tests and performance: coverage spans many branches, but default correctness UT inherits host-derived wall-clock gates, one packed-file check risks FDB transaction timeout, and shared FDB state invalidates later scenarios after a partial failure.
- Observability and errors: existing logs identify the instance, tablet, and key; asynchronous best-effort deletion failures retain keys for retry and were not raised as a separate issue.
- User focus: none was supplied.
Validation was static-only as required; no local builds or tests were run. Exact-head Cloud UT currently reports pass, but that single controlled run does not clear the path and portability issues above.
779fc23 to
454de17
Compare
|
run buildall |
| @@ -5880,7 +5880,7 @@ int InstanceRecycler::recycle_rowsets() { | |||
| LOG(INFO) << "delete the recycle rowset kv that has empty resource_id, key=" | |||
| << hex(k) << " value=" << proto_to_json(rowset); | |||
| rowset_keys.emplace_back(k); | |||
| return -1; | |||
| return 0; | |||
There was a problem hiding this comment.
We need to ensure that the rowset recycled through this path is successful.
|
run cloudut |
4a057f4 to
6174463
Compare
|
run cloudut |
Cloud UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run buildall |
|
/review |
There was a problem hiding this comment.
Review summary
Static review of the authoritative base/head diff for the requested scope (no user focus supplied). No builds or tests were run, per the review instructions.
- Goal and correctness: the non-versioned empty-resource branch now queues the legacy key and reports success; the related versioned-path compatibility concern is already covered by the existing inline thread, with no additional recycler defect found.
- Concurrency and lifecycle: recycler worker-pool completion and teardown were traced; no new production locking/lifecycle issue was found. The packed benchmark's intended cross-worker conflict workload is not actually concurrent (inline finding below).
- Persistence and state: the benchmark's fixed namespace/partial-failure contamination is already covered by the existing state-isolation thread.
- Compatibility and parallel paths: the unchanged versioned handlers remain covered by the existing recycler comment; this review does not duplicate it.
- Test coverage: the new abort-order scenario is vacuous because it registers no observation callback (inline finding below).
- Performance/observability: the default-UT wall-clock and packed verification transaction risks are already covered by existing threads; no additional distinct issue was retained.
The two inline findings below should be addressed before merge.
| ASSERT_EQ(recycler_->recycle_rowsets(), 0); | ||
| ASSERT_EQ(count_recycle_rowsets(), 1); | ||
|
|
||
| auto* sp = SyncPoint::get_instance(); |
There was a problem hiding this comment.
[P2] Make the abort-before-delete check observe transaction state
prepare_abort_before_delete claims to validate ordering, but this block never calls set_call_back; it only enables an empty SyncPoint and then checks that the rowset eventually disappears. A regression that deletes the PREPARE rowset before aborting its transaction would still pass. Please install the existing MockAccessor::delete_prefix callback (and assert the seeded txn is TXN_STATUS_ABORTED) before checking rowset removal, or remove the ordering claim.
| packed_info.set_state(PackedFileInfoPB::NORMAL); | ||
| int64_t offset = 0; | ||
| for (int64_t j = 0; j < kRowsetsPerPackedFile; ++j) { | ||
| // Spread references across scan batches so different recycler workers can |
There was a problem hiding this comment.
[P2] Make the packed workload actually exercise cross-worker retries
The comment says these references are spread across scan batches so workers contend, but this test seeds exactly 10,000 rowset keys and scan_and_recycle fetches 10,000 per page; loop_done then submits that whole page to one delete_rowset_data worker, which updates packed-file KVs serially. Thus no same-packed-file conflict/retry is exercised, and the ten-pass loop only checks eventual counts. Please force multiple batches/workers (or add a barrier) and assert a retry/conflict was observed if this is intended to benchmark that path.
Problem Summary: Add comprehensive recycler rowset benchmarks covering legacy and new rowset formats, transaction aborts, delete bitmap variants, packed files, missing schemas, and mixed workloads. Treat legacy rowsets with empty resource IDs as successfully queued for KV deletion instead of reporting a recycling failure. **The current statistical logic has a bug; there's no need to worry about recycled_num and recycled_bytes.** The performance check watermark can be controlled via the environment variable `recycler_benchmark_duration_tolerance_ratio`. ``` recycler benchmark: operation=recycle_rowsets branch total_ms recycled_num recycled_bytes get_keys put_keys del_keys total_keys compacted_empty 1708.36 30000 46080000 30000 0 30000 60000 compacted_with_data/data_only 3489.12 30000 46080000 30001 0 30000 60001 compacted_with_data/delete_bitmap_v1 4084.44 30000 46080000 30000 0 30000 60000 compacted_with_data/delete_bitmap_v2 3869.88 30000 46080000 60000 0 60000 120000 compacted_with_packed_data/data_only 9444.14 0 0 63000 30000 33000 126000 compacted_with_packed_data/delete_bitmap_v1 9465.94 0 0 63000 30000 33000 126000 compacted_with_packed_data/delete_bitmap_v2 10366.38 30000 46080000 93000 30000 63000 186000 compacted_without_schema 6544.83 30000 46080000 30000 0 30000 60000 legacy_empty_resource 1657.66 0 0 30000 0 30000 60000 legacy_with_resource 5227.31 30000 0 60000 0 60000 120000 mixed 46285.68 90000 92160000 600000 120000 360000 1080000 prepare_abort 22566.18 0 0 270000 90000 90000 450000 prepare_direct 5841.44 0 0 60000 0 60000 120000 prepare_mark 8208.94 0 0 120000 30000 60000 210000 total 138760.29 300000 368640000 1539001 330000 969000 2838001 ```
…#68043 (#68581) Cherry-picked from #68043 Co-authored-by: Yixuan Wang <[email protected]>
…#68043 (#68581) Cherry-picked from #68043 Co-authored-by: Yixuan Wang <[email protected]>
…68622) ### What problem does this PR solve? Related PR: #68043 Problem Summary: The recycler benchmark ran as part of recycler_test and used fixed elapsed-time thresholds, making default test runs slower and timing-dependent. Move it into a standalone recycler_benchmark_test binary and skip it during default Cloud test discovery while preserving explicit selection with --test. Reduce the workload to 5,000 rowsets per branch, update all 14 observed KV count baselines, and remove elapsed-time failure thresholds. Timings remain in the benchmark report.
…pache#68622) ### What problem does this PR solve? Related PR: apache#68043 Problem Summary: The recycler benchmark ran as part of recycler_test and used fixed elapsed-time thresholds, making default test runs slower and timing-dependent. Move it into a standalone recycler_benchmark_test binary and skip it during default Cloud test discovery while preserving explicit selection with --test. Reduce the workload to 5,000 rowsets per branch, update all 14 observed KV count baselines, and remove elapsed-time failure thresholds. Timings remain in the benchmark report.
…68622) ### What problem does this PR solve? Related PR: #68043 Problem Summary: The recycler benchmark ran as part of recycler_test and used fixed elapsed-time thresholds, making default test runs slower and timing-dependent. Move it into a standalone recycler_benchmark_test binary and skip it during default Cloud test discovery while preserving explicit selection with --test. Reduce the workload to 5,000 rowsets per branch, update all 14 observed KV count baselines, and remove elapsed-time failure thresholds. Timings remain in the benchmark report.
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Add comprehensive recycler rowset benchmarks covering legacy and new rowset formats, transaction aborts, delete bitmap variants, packed files, missing schemas, and mixed workloads.
Treat legacy rowsets with empty resource IDs as successfully queued for KV deletion instead of reporting a recycling failure.
The current statistical logic has a bug; there's no need to worry about recycled_num and recycled_bytes.
The performance check watermark can be controlled via the environment variable
recycler_benchmark_duration_tolerance_ratio.Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)