hudi-agent commented on code in PR #19199: URL: https://github.com/apache/hudi/pull/19199#discussion_r3535400244
########## hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/upgrade/TenToNineDowngradeHandler.java: ########## @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hudi.table.upgrade; + +import org.apache.hudi.common.engine.HoodieEngineContext; +import org.apache.hudi.common.table.HoodieTableConfig; +import org.apache.hudi.config.HoodieWriteConfig; + +import java.util.Collections; + +/** + * Version 10 writes native log files by default. Downgrading to version 9 requires + * full compaction of native data/delete logs before the downgrade completes. Review Comment: 🤖 With the native-CDC guard removed, committed `.cdc.parquet` files now survive a 10→9 downgrade — `rollbackFailedWritesAndCompact` only merges data/delete logs, not CDC logs — so they'd remain after the table is stamped v9, which per the PR description v9 can't read, silently breaking CDC incremental reads. Rather than dropping the check entirely (I know the earlier concern was over-blocking on orphan files), could it instead run after `rollbackFailedWrites` so only committed CDC logs fail fast? Or is CDC-log downgrade being descoped to a follow-up? <sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag quality.</i></sub> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
