masteryhx commented on code in PR #23509:
URL: https://github.com/apache/flink/pull/23509#discussion_r1382969491


##########
flink-core/src/main/java/org/apache/flink/configuration/CheckpointingOptions.java:
##########
@@ -228,6 +228,32 @@ public class CheckpointingOptions {
                                     + "in a Flink supported filesystem. The 
storage path must be accessible from all participating processes/nodes"
                                     + "(i.e. all TaskManagers and 
JobManagers).");
 
+    /**
+     * Whether to create sub-directories named by job id to store the data 
files and meta data of
+     * checkpoints. The default value is true to enable user could run several 
jobs with the same
+     * checkpoint directory at the same time. If this value is set to false, 
pay attention not to
+     * run several jobs with the same directory simultaneously.
+     */
+    @Documentation.Section(Documentation.Sections.EXPERT_STATE_BACKENDS)
+    public static final ConfigOption<Boolean> CREATE_CHECKPOINT_SUB_DIS =

Review Comment:
   ```suggestion
       public static final ConfigOption<Boolean> CREATE_CHECKPOINT_SUB_DIR =
   ```



##########
flink-core/src/main/java/org/apache/flink/configuration/CheckpointingOptions.java:
##########
@@ -228,6 +228,32 @@ public class CheckpointingOptions {
                                     + "in a Flink supported filesystem. The 
storage path must be accessible from all participating processes/nodes"
                                     + "(i.e. all TaskManagers and 
JobManagers).");
 
+    /**
+     * Whether to create sub-directories named by job id to store the data 
files and meta data of
+     * checkpoints. The default value is true to enable user could run several 
jobs with the same
+     * checkpoint directory at the same time. If this value is set to false, 
pay attention not to
+     * run several jobs with the same directory simultaneously.
+     */
+    @Documentation.Section(Documentation.Sections.EXPERT_STATE_BACKENDS)
+    public static final ConfigOption<Boolean> CREATE_CHECKPOINT_SUB_DIS =
+            ConfigOptions.key("state.checkpoints.create-subdir")
+                    .booleanType()
+                    .defaultValue(true)
+                    .withDescription(
+                            Description.builder()
+                                    .text(
+                                            "Whether to create sub-directories 
named by job id under the '%s' to store the data files and meta data "
+                                                    + "of checkpoints. The 
default value is true to enable user could run several jobs with the same "
+                                                    + "checkpoint directory at 
the same time. If this value is set to false, pay attention not to "
+                                                    + "run several jobs with 
the same directory simultaneously. ",
+                                            
TextElement.code(CHECKPOINTS_DIRECTORY.key()))
+                                    .linebreak()
+                                    .text(
+                                            "WARNING: This is an advanced 
configuration. If set to false, users must ensure that no multiple jobs are run 
"

Review Comment:
   I'd suggest to also describe this together with restore mode which will make 
it clearer.
   If in claim mode, it's fine to go with this option.
   If in no-claim mode, What will happen ? Maybe some files are left forever 
together with running checkpoint which seems confusing and unclear.
   If starting without checkpoint,  the job may fail due to same chk file so it 
should be handled by users.



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

Reply via email to