[feat](fe) Support Cloud partition inverted format rollout - #66235
Open
hoshinojyunn wants to merge 1 commit into
Open
[feat](fe) Support Cloud partition inverted format rollout#66235hoshinojyunn wants to merge 1 commit into
hoshinojyunn wants to merge 1 commit into
Conversation
### What problem does this PR solve? Issue Number: None Related PR: apache#57013 Problem Summary: Cloud tables need to roll out inverted-index V2 and V3 formats partition by partition without changing existing partitions. Persist each logical partition's base format through creation, replay, replacement, recycle, recovery, restore, and table-property replay. Replacement partitions retain their source tablet schema. For a base-index schema change, retain the standard global target column schema while generating tablet schemas with each partition's persisted format. The partition format property is Cloud-only and is rejected in non-Cloud create and alter paths. ### Release note Cloud tables support partition-level V2/V3 inverted-index format rollout. ### Check List (For Author) - Test: Regression test and unit test - Regression test: test_partition_cloud_inverted_index_storage_format_rollout passed - Regression test: test_partition_cloud_inverted_index_storage_format_recycle_truncate passed - Regression test: test_backup_restore_inverted_idx passed - Unit test: ./run-fe-ut.sh --run org.apache.doris.common.PropertyAnalyzerTest,org.apache.doris.nereids.trees.plans.CreateTableCommandTest,org.apache.doris.service.FrontendServiceImplCloudTest,org.apache.doris.cloud.datasource.CloudInternalCatalogTest,org.apache.doris.alter.CloudSchemaChangeJobV2Test,org.apache.doris.catalog.TablePropertyTest,org.apache.doris.catalog.EnvTest passed - Unit test: ./run-fe-ut.sh --run org.apache.doris.alter.CloudSchemaChangeJobV2Test,org.apache.doris.catalog.OlapTableTest,org.apache.doris.persist.ModifyDynamicPartitionInfoTest passed - Build: DISABLE_BUILD_UI=ON ./build.sh --fe passed - Behavior changed: Yes. Cloud partitions retain their creation-time format while new partitions use the current configured format. - Does this need documentation: No
hoshinojyunn
requested review from
924060929,
CalvinKirs,
dataroaring,
englefly,
gavinchou,
luwei16,
morningman,
morrySnow,
mymeiyi and
starocean999
as code owners
July 29, 2026 09:58
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
Contributor
TPC-H: Total hot run time: 29746 ms |
Contributor
TPC-DS: Total hot run time: 177881 ms |
Contributor
ClickBench: Total hot run time: 25.08 s |
Contributor
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
Contributor
FE Regression Coverage ReportIncrement line coverage |
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: None
Related PR: None
Problem Summary:
Cloud tables previously used one table-level
inverted_index_storage_format, so an online V2-to-V3 migration required all partitions to move together. This prevents a gradual rollout and makes it impossible to retain the correct tablet schema for old partitions while creating new partitions with a new format.This PR adds the Cloud-only table property
partition.inverted_index_storage_format. It is the format default for partitions created after the property is set. The property supports V2 and V3; V1 is rejected. Existing partitions and their tablet metas are not rewritten.Design:
PartitionInfofor every Cloud partition. The value is durable in journal/replay and is transferred through partition replacement, recycle/recover, add-partition-like, insert overwrite, and truncate flows.CloudSchemaChangeJobV2, and creates each partition's base shadow tablet with the matching format and schema version. Non-base indexes keep their normal schema-change behavior.SHOW PARTITIONS,SHOW PARTITION <id>,SHOW PARTITION ID, and the partitions TVF exposeInvertedIndexStorageFormatfromPartitionInfo; they no longer need to read tablet meta from MetaService for this value.Example SQL and expected effect:
Selected output:
Both formats remain queryable during the rollout:
The query returns both rows.
TRUNCATE TABLE ... PARTITION p_oldandINSERT OVERWRITE ... PARTITION(p_old)continue to create V2 tablet metas forp_old, even after the default changes to V3. A subsequentMODIFY COLUMNcreates distinct base shadow schema versions for active V2 and V3 partitions, then preserves the format/version pairing when committing the schema change.Release note
Cloud OLAP tables can roll out inverted-index file storage formats by partition. New partitions can use V3 while existing V2 partitions remain online and queryable.
Check List (For Author)
Feature and Test Coverage
MATCH_ANYqueries return rows from every partition.test_partition_cloud_inverted_index_storage_format_rolloutpartition.inverted_index_storage_format=V3creates its initial partition with V3.test_partition_cloud_inverted_index_storage_format_rollout; FE creation/property teststest_partition_cloud_inverted_index_storage_format_rolloutSHOW PARTITIONS,SHOW PARTITION <id>, and tablet meta report V2/V3 for range, list, auto, and dynamic partitions.test_cloud_show_inverted_index_storage_format; FEShowPartitionIdCommandTest, partitions TVF output testTRUNCATE TABLE/ partition replacementtest_partition_cloud_inverted_index_storage_format_recycle_truncateand rollout suite; FEOlapTableTest.testReplacePartitionPreservesInvertedIndexStorageFormatINSERT OVERWRITEtest_partition_cloud_inverted_index_storage_format_rollout; FE Cloud catalog and FrontendService teststest_partition_cloud_inverted_index_storage_format_recycle_truncate; FECatalogRecycleBinTest.testRecoverPartitionMODIFY COLUMN; shadow base and rollup indexes are validated while the job is RUNNING.test_partition_cloud_inverted_index_storage_format_rollout; FECloudSchemaChangeJobV2TestExecuted tests:
Changed FE test classes: 70 tests passed.
Targeted
OlapTableTestandCatalogRecycleBinTest: 41 tests passed.Cloud Docker regressions:
test_cloud_show_inverted_index_storage_formattest_partition_cloud_inverted_index_storage_format_recycle_truncatetest_partition_cloud_inverted_index_storage_format_rolloutBehavior changed:
partition.inverted_index_storage_format; it affects only subsequently created partitions and exposes the resolved format in partition metadata commands.Does this need documentation?
Check List (For Reviewer who merge this PR)