Guosmilesmile opened a new pull request, #17210:
URL: https://github.com/apache/iceberg/pull/17210

   ### Motivation
   The default value of uidSuffix in TableMaintenance.Builder was previously:
   ```java
   private String uidSuffix = "TableMaintenance-" + UUID.randomUUID();
   ```
   This makes savepointsunusable for job recovery. When users try to restart a 
maintenance job from a savepoint, they hit the following error:
   
   ```
   Cannot map checkpoint/savepoint state for operator 
b1b352db8bd2aef51f7534c353789605
   to the new program, because the operator is not available in the new program.
   If you want to allow to skip this, you can set the --allowNonRestoredState 
option on the CLI.
   ```
   
   Although we can explicitly configure uidSuffix to work around this problem, 
it shouldn't be a required field.
   
   ### Changes
   Change the default uidSuffix to be deterministically derived from the table 
name and the task names
   
   ### Limitation
   
   The new approach cannot automatically disambiguate uids in the following 
scenario:
   Within a single Flink job, two TableMaintenance instances are created for 
the same table, and both pipelines are configured with the same set of 
maintenance task types (e.g. both contain a RewriteDataFiles, only differing in 
partition predicates or parameters).
   
   In this case both pipelines see the same tableName and the same sorted set 
of task names, so the fallback uidSuffix values are identical, causing 
pipeline-level shared operators to collide.
   
   My understanding is that in this scenario, configuring multiple tasks inside 
a single TableMaintenance is the appropriate usage. Multiple tasks can be add() 
into one pipeline, which is more resource-efficient and provides cleaner lock 
semantics. If a user really needs to split the tasks across multiple 
TableMaintenance instances, they can still disambiguate by explicitly providing 
a distinct uidSuffix to each instance.


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to