Draft
Conversation
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Add support for table-level filtering in event-driven warmup jobs via ON TABLES (INCLUDE/EXCLUDE 'glob_pattern') SQL syntax. This allows users to selectively warm up only specific tables matching glob patterns instead of warming up all tables in a cluster. Changes: - FE: Add OnTablesFilter class with glob-to-regex compilation, INCLUDE/EXCLUDE semantics, and shouldWarmUp() method - FE: Extend ANTLR grammar with onTablesClause and INCLUDE token - FE: Extend CloudWarmUpJob with table filter persistence, canonical JSON representation, and dynamic table ID resolution - FE: Extend CacheHotspotManager with table filter dedup (JobKey), resolveTableIds(), and periodic refreshAllTableFilters() - FE: Add TableFilter and MatchedTables columns to ShowWarmUpCommand - BE: Add EventDrivenJobFilter type alias with per-job table_id filtering in get_replica_info() - BE: Pass table_id from tablet level through commit_rowset() to warm_up_rowset() instead of extracting from rs_meta - Thrift: Add optional table_ids field to TWarmUpTabletsRequest - Tests: Add FE tests (OnTablesFilterTest, CloudWarmUpJobTableFilterTest) and BE tests (CloudWarmUpManagerFilterTest) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ble_ids handling - FE: Move refreshAllTableFilters() from JobDaemon into a new TableFilterRefreshDaemon with its own configurable interval (cloud_warm_up_table_filter_refresh_interval_ms, default 60s) - FE: Always send table_ids when hasTableFilter() is true, even if empty - BE: When table_ids is non-null but empty, set empty filter set (warm up nothing) instead of nullopt (warm up everything). This correctly handles the scenario where all matched tables have been deleted. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Rewrite OnTablesFilterTest: remove redundancy, consolidate into 10 focused tests covering glob wildcards, INCLUDE/EXCLUDE semantics, regex metachar escaping, complex multi-db scenarios - Rewrite CloudWarmUpJobTableFilterTest: 12 tests covering canonicalize(), rebuildOnTablesFilter(), hasTableFilter(), getJobInfo(), Builder validation - Add WarmUpClusterOnTablesParseTest: 10 tests verifying ON TABLES grammar parsing (single/multiple rules, FORCE, COMPUTE GROUP), syntax errors (empty parens, missing parens, missing pattern), and parsed field values - Use Mockito (not JMockit) for ConnectContext mocking Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Rewrite CloudWarmUpJobTableFilterTest (13 tests): add SHOW WARM UP JOB column verification (all 15 columns), matched tables string output, dynamic table ID tracking (create/drop/rename scenarios) - Create CacheHotspotManagerTableFilterTest (13 tests): test resolveTableIds with mocked Env/InternalCatalog, dynamic table changes (new table, drop, rename), refreshAllTableFilters with running jobs, cluster-level job skip - Fix unused import in OnTablesFilterTest Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…atchedTables - Make tableFilterExpr transient (not persisted), computed from tableFilterRules via canonicalize() as single source of truth - Add computeTableFilterExpr() helper, called in constructor and rebuildOnTablesFilter() - Remove setTableFilterExpr() from Builder - Change currentTableIds from Set<Long> to Map<Long, String> mapping table ID to 'db.table' qualified name - Update getMatchedTablesString() to show sorted db.table names (e.g., 'ods.orders, ods.products') instead of numeric IDs - Update resolveTableIds() in CacheHotspotManager to return Map<Long, String> and update all callers - Add 3 new tests, update all existing tests for new API Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
df24c66 to
431bbcd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)