[Chore](runtime-filter) replace DCHECK/CHECK with Error Status or Exceptions#60563
[Chore](runtime-filter) replace DCHECK/CHECK with Error Status or Exceptions#60563BiteTheDDDDt wants to merge 3 commits intoapache:masterfrom
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
There was a problem hiding this comment.
Pull request overview
This pull request improves robustness in the runtime filter subsystem by replacing internal assertion checks (DCHECK/CHECK) with explicit error handling. The changes convert potential silent failures into actionable error statuses or exceptions, making debugging easier and improving production stability.
Changes:
- Replaced DCHECK assertions with Status::InternalError returns in functions that return Status
- Replaced DCHECK assertions with throw Exception in constructors, void functions, and lambdas where Status cannot be returned
- Added comprehensive error messages with contextual information (filter IDs, states, debug strings) for all converted checks
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| runtime_filter_wrapper.cpp | Added error handling for filter merging state checks, type mismatches, string parsing failures, and missing filter data in assignment operations |
| runtime_filter_producer_helper_cross.h | Added error handling for invalid result column IDs in cross join filter processing |
| runtime_filter_producer_helper.cpp | Added error handling for invalid result column IDs, broadcast join validation checks, and null profile pointer handling |
| runtime_filter_producer.cpp | Added error handling for broadcast join expectations, null dependency checks in latch/send/sync operations |
| runtime_filter_mgr.cpp | Added error handling for null merger checks and empty target info validation |
| runtime_filter_consumer.cpp | Added error handling for null-aware filter type mismatches and null profile pointer handling |
| runtime_filter.h | Added error handling for conflicting remote/local target flags in constructor and null data pointer checks |
| runtime_filter.cpp | Added error handling for null data pointer after serialization |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
run buildall |
|
run buildall |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
What problem does this PR solve?
This pull request replaces many
DCHECKassertions with explicit error handling throughout the runtime filter codebase. The changes improve robustness by converting failed internal assumptions into meaningful error statuses or exceptions, which helps prevent silent failures and makes debugging easier.Error handling improvements for runtime filter logic:
DCHECKassertions with status checks and error returns for null pointers, invalid states, and filter type mismatches inruntime_filter.cpp,runtime_filter.h,runtime_filter_consumer.cpp,runtime_filter_mgr.cpp, andruntime_filter_producer.cpp. This includes checks for serialization data, filter dependencies, and filter merge conditions. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]Error handling for producer and helper classes:
runtime_filter_producer_helper.cppandruntime_filter_producer_helper_cross.h. Checks ensure correct filter construction and insertion logic. [1] [2] [3] [4]Error handling for filter merging and assignment:
runtime_filter_wrapper.cppduring merging. Added exceptions for failed string parsing in filter assignment for various types. Checks for null filter functions and parsing failures in min/max filter assignment. [1] [2] [3] [4] [5] [6] [7]Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)