You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "francis-a (via GitHub)" <gi...@apache.org> on 2026/06/10 12:12:33 UTC

[PR] [FLINK-39900] [forst] Add configuration option for setting the number of ForSt transfer threads [flink]

francis-a opened a new pull request, #28373:
URL: https://github.com/apache/flink/pull/28373

   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [JIRA issue](https://issues.apache.org/jira/projects/FLINK/issues). Exceptions are made for typos in JavaDoc or documentation files, which need no JIRA issue.
     
     - Name the pull request in the form "[FLINK-XXXX] [component] Title of the pull request", where *FLINK-XXXX* should be replaced by the actual issue number. Skip *component* if you are unsure about which is the best component.
     Typo fixes that have no associated JIRA issue should be named following this pattern: `[hotfix] [docs] Fix typo in event time introduction` or `[hotfix] [javadocs] Expand JavaDoc for PuncuatedWatermarkGenerator`.
   
     - Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
     
     - Make sure that the change passes the automated tests, i.e., `mvn clean verify` passes. You can set up Azure Pipelines CI to do that following [this guide](https://cwiki.apache.org/confluence/display/FLINK/Azure+Pipelines#AzurePipelines-Tutorial:SettingupAzurePipelinesforaforkoftheFlinkrepository).
   
     - Each pull request should address only one issue, not mix up code from multiple issues.
     
     - Each commit in the pull request has a meaningful commit message (including the JIRA id)
   
     - Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
   
   
   **(The sections below can be removed for hotfixes of typos)**
   -->
   
   ## What is the purpose of the change
   
   Currently the number of threads used by the `ForStStateDataTransfer` class is hardcoded to 4. This PR proposes a new `state.backend.forst.checkpoint.transfer.thread.num` configuration option that allows for providing a custom thread number value.
   
   ## Brief change log
   - Added a new `state.backend.forst.checkpoint.transfer.thread.num` config option
   - Updated the `ForStResourceContainer` with a getter to return this option value
   - Updated `ForStStateDataTransfer` to provide the new config option value instead of the hardcoded default of 4
   - Removed the hardcoded default
   
   
   
   ## Verifying this change
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: / no
     - The serializers: no 
     - The runtime per-record code paths (performance sensitive): no
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
     - The S3 file system connector: (yes / no / don't know)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? yes
     - If yes, how is the feature documented?  Documentation has been added using the existing `ConfigOption` class
   


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-39900] [forst] Add configuration option for setting the number of ForSt transfer threads [flink]

Posted by "Zakelly (via GitHub)" <gi...@apache.org>.
Zakelly merged PR #28373:
URL: https://github.com/apache/flink/pull/28373


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-39900] [forst] Add configuration option for setting the number of ForSt transfer threads [flink]

Posted by "davidradl (via GitHub)" <gi...@apache.org>.
davidradl commented on code in PR #28373:
URL: https://github.com/apache/flink/pull/28373#discussion_r3577855105


##########
docs/layouts/shortcodes/generated/forst_configuration.html:
##########
@@ -38,6 +38,12 @@
             <td>MemorySize</td>
             <td>An upper-bound of the size that can be used for cache. User should specify at least one cache size limit to enable the cache, either this option or the 'state.backend.forst.cache.reserve-size' option. They can be set simultaneously, and in this case, cache will grow if meet the requirements of both two options. The default value is '0 bytes', meaning that this option is disabled. </td>
         </tr>
+        <tr>
+            <td><h5>state.backend.forst.checkpoint.transfer.thread.num</h5></td>
+            <td style="word-wrap: break-word;">4</td>
+            <td>Integer</td>

Review Comment:
   This we should document the default value of 4. Also there should be documentation to describe bet practises around when this new option should be used and any side effects if it is incorrectly configured.  



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-39900] [forst] Add configuration option for setting the number of ForSt transfer threads [flink]

Posted by "snuyanzin (via GitHub)" <gi...@apache.org>.
snuyanzin commented on PR #28373:
URL: https://github.com/apache/flink/pull/28373#issuecomment-5147024541

   everything is much worse
   the test is expecting 10 and actual is 4
   https://dev.azure.com/apache-flink/apache-flink/_build/results?buildId=77624&view=logs&j=0da23115-68bb-5dcd-192c-bd4c8adebde1&t=1ffc5ec2-7913-50ff-0177-3fca16f1b8f0&l=12254
   
   I'm going just revert the problem commit (fyi: @spuru9 @Zakelly @francis-a )
   
   Please DO NOT MERGE code which does not pass CI tests first


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-39900] [forst] Add configuration option for setting the number of ForSt transfer threads [flink]

Posted by "francis-a (via GitHub)" <gi...@apache.org>.
francis-a commented on PR #28373:
URL: https://github.com/apache/flink/pull/28373#issuecomment-5167471087

   The new PR is open here: https://github.com/apache/flink/pull/28897
   
   The test failure caught a real issue with the new property missing from the config merge set in `ForStConfigurableOptions`


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-39900] [forst] Add configuration option for setting the number of ForSt transfer threads [flink]

Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #28373:
URL: https://github.com/apache/flink/pull/28373#issuecomment-4670077511

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "abee959dad43c7958b57ef078ee711ec03a7a5ed",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "abee959dad43c7958b57ef078ee711ec03a7a5ed",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * abee959dad43c7958b57ef078ee711ec03a7a5ed UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-39900] [forst] Add configuration option for setting the number of ForSt transfer threads [flink]

Posted by "francis-a (via GitHub)" <gi...@apache.org>.
francis-a commented on PR #28373:
URL: https://github.com/apache/flink/pull/28373#issuecomment-4956520592

   Thanks @spuru9, I've run this and the task resulted in no changes


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-39900] [forst] Add configuration option for setting the number of ForSt transfer threads [flink]

Posted by "francis-a (via GitHub)" <gi...@apache.org>.
francis-a commented on code in PR #28373:
URL: https://github.com/apache/flink/pull/28373#discussion_r3578801722


##########
docs/layouts/shortcodes/generated/forst_configuration.html:
##########
@@ -38,6 +38,12 @@
             <td>MemorySize</td>
             <td>An upper-bound of the size that can be used for cache. User should specify at least one cache size limit to enable the cache, either this option or the 'state.backend.forst.cache.reserve-size' option. They can be set simultaneously, and in this case, cache will grow if meet the requirements of both two options. The default value is '0 bytes', meaning that this option is disabled. </td>
         </tr>
+        <tr>
+            <td><h5>state.backend.forst.checkpoint.transfer.thread.num</h5></td>
+            <td style="word-wrap: break-word;">4</td>
+            <td>Integer</td>

Review Comment:
   Thanks, I updated this to be more explicit. 



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-39900] [forst] Add configuration option for setting the number of ForSt transfer threads [flink]

Posted by "snuyanzin (via GitHub)" <gi...@apache.org>.
snuyanzin commented on PR #28373:
URL: https://github.com/apache/flink/pull/28373#issuecomment-5145570642

   here it is the fix https://github.com/apache/flink/pull/28859
   can someone please approve?


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-39900] [forst] Add configuration option for setting the number of ForSt transfer threads [flink]

Posted by "spuru9 (via GitHub)" <gi...@apache.org>.
spuru9 commented on code in PR #28373:
URL: https://github.com/apache/flink/pull/28373#discussion_r3388789078


##########
flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/ForStOptions.java:
##########
@@ -300,4 +300,12 @@ public class ForStOptions {
                                     + " Only valid when '"
                                     + EXECUTOR_WRITE_IO_INLINE.key()
                                     + "' is false.");
+
+    @Documentation.Section(Documentation.Sections.EXPERT_FORST)
+    public static final ConfigOption<Integer> CHECKPOINT_TRANSFER_THREAD_NUM =

Review Comment:
   Can you check for the instruction for generated file to refer to these option.
   https://github.com/apache/flink/blob/master/flink-docs/README.md#configuration-documentation



##########
flink-state-backends/flink-statebackend-forst/src/test/java/org/apache/flink/state/forst/snapshot/ForStIncrementalSnapshotStrategyTest.java:
##########
@@ -199,7 +199,7 @@ private ForStIncrementalSnapshotStrategy<?> createSnapshotStrategy()
                 CompositeKeySerializationUtils.computeRequiredBytesInKeyGroupPrefix(2),
                 UUID.randomUUID(),
                 new TreeMap<>(),
-                new ForStStateDataTransfer(ForStStateDataTransfer.DEFAULT_THREAD_NUM),
+                new ForStStateDataTransfer(4),

Review Comment:
   Would be better to derive the default values.
   
   ```suggestion
                   new ForStStateDataTransfer(ForStOptions.CHECKPOINT_TRANSFER_THREAD_NUM.defaultValue()),
   ```



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-39900] [forst] Add configuration option for setting the number of ForSt transfer threads [flink]

Posted by "francis-a (via GitHub)" <gi...@apache.org>.
francis-a commented on code in PR #28373:
URL: https://github.com/apache/flink/pull/28373#discussion_r3389019473


##########
flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/ForStOptions.java:
##########
@@ -300,4 +300,12 @@ public class ForStOptions {
                                     + " Only valid when '"
                                     + EXECUTOR_WRITE_IO_INLINE.key()
                                     + "' is false.");
+
+    @Documentation.Section(Documentation.Sections.EXPERT_FORST)
+    public static final ConfigOption<Integer> CHECKPOINT_TRANSFER_THREAD_NUM =

Review Comment:
   Thanks for the link, this should be done now



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-39900] [forst] Add configuration option for setting the number of ForSt transfer threads [flink]

Posted by "francis-a (via GitHub)" <gi...@apache.org>.
francis-a commented on PR #28373:
URL: https://github.com/apache/flink/pull/28373#issuecomment-5167177714

   @snuyanzin @Zakelly sorry about that, that is on me for not noticing the failing test. Thanks for taking care of the revert. I will re-open this change set with the needed test fixes. 


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-39900] [forst] Add configuration option for setting the number of ForSt transfer threads [flink]

Posted by "snuyanzin (via GitHub)" <gi...@apache.org>.
snuyanzin commented on PR #28373:
URL: https://github.com/apache/flink/pull/28373#issuecomment-5145568185

   @Zakelly , @spuru9 , @francis-a this commit broke the build


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-39900] [forst] Add configuration option for setting the number of ForSt transfer threads [flink]

Posted by "Zakelly (via GitHub)" <gi...@apache.org>.
Zakelly commented on PR #28373:
URL: https://github.com/apache/flink/pull/28373#issuecomment-5148927428

   @snuyanzin oh sorry, my fault. I was interrupted halfway through the review and mistakenly thought the CI for this PR had already passed.
   
   Thanks for the revert.


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org