Dan Newton
10/28/2026, 9:09 AM1.2.16. We are also loading a lot of data at the moment using stream load separately. Compaction is high, in the 100s. The flink job keeps failing because of the compaction rate being too high, despite me increasing the threads available to compactions and the max compaction tasks that can be scheduled. What can i change to improve the situation. For clarity, it seems the flink job fails due to a thread socket not receiving a response from starrocks and blocks the flink job from completing its checkpointsRocky
10/28/2026, 9:09 AMWITH clause:
* sink.buffer-flush.interval-ms: Increase this (e.g., to 10000 or 30000). If you are flushing every 1–2 seconds, you are creating thousands of small versions per hour.
* sink.buffer-flush.max-rows: Increase this (e.g., 500000) to ensure you only flush when a significant amount of data is ready.
* sink.buffer-flush.max-bytes: Increase this (e.g., 104857600 for 100MB) to favor fewer, larger files.
2. Enable Merge Commit (If on StarRocks v3.4+)
If your StarRocks version is 3.4 or later, you can use the Merge Commit feature. This allows multiple Flink subtasks and even multiple Flink jobs to merge their data into a single transaction/version in StarRocks.
* sink.properties.enable_merge_commit: Set to true.
* sink.properties.merge_commit_interval_ms: Set to 10000 (10 seconds).
3. Adjust Flink Connector Timeouts
Since the Flink job fails because it doesn't receive a response during the ingestion slowdown, you should increase the socket timeout to prevent the job from crashing while StarRocks is under pressure.
* sink.socket.timeout-ms: Increase this from the default (or -1 for no timeout) to a high value like 60000 (60s) or more to give StarRocks time to respond during high pressure.
* sink.connect.timeout-ms: Ensure this is at least 30000.
4. Optimize StarRocks BE Compaction Parameters
Beyond just increasing threads, you should tune how aggressively the system picks up small versions for cumulative compaction:
* max_cumulative_compaction_num_singleton_deltas: (Default 1000). Consider lowering this to 100 or 200 to trigger cumulative compaction earlier.
* max_compaction_concurrency: If your CPU and Disk I/O have headroom, ensure this is set high enough to utilize the threads you added.
* cumulative_compaction_policy: If you are using the size_based policy (default in newer versions), ensure it is configured to merge small files aggressively.
5. Check Ingestion Slowdown Thresholds
If you are using a Shared-data (Cloud-native) cluster, the system specifically triggers slowdowns based on FE configurations. You can check these using `ADMIN SHOW FRONTEND CONFIG`:
* `lake_ingest_slowdown_threshold`: Default is 100. If your hardware is powerful, you can temporarily increase this to 200 to stop the Flink job from blocking, but this is a "band-aid" and may eventually lead to lake_compaction_score_upper_bound (default 2000) where imports are rejected entirely.
Summary of Priority Actions:
1. Increase sink.buffer-flush.interval-ms in Flink to at least 10–20 seconds.
2. Increase sink.socket.timeout-ms to prevent Flink job failure during StarRocks backpressure.
3. Check for "Too many versions" in the StarRocks BE logs to see if a specific tablet is the bottleneck.
References
• administration/management/compaction.md
• knowledge/admin_and_operation/shared_data_compaction.mdDan Newton
10/28/2026, 9:28 AMRocky
10/28/2026, 9:28 AM60000 (60s) or higher in your Flink Sink properties. This prevents the Flink job from failing when StarRocks intentionally delays a response to throttle ingestion.
* Increase `sink.buffer-flush.max-rows`: As previously noted, keep this at 500000 or higher to ensure Flink isn't also contributing to the small-version problem.
3. Use "Merge Commit" (If on v3.4+)
If your StarRocks version allows it, enable Merge Commit for the Flink job. This allows StarRocks to take multiple small flushes from Flink and group them into a single version on the server side, which drastically lowers the compaction score.
sql
'sink.properties.enable_merge_commit' = 'true',
'sink.properties.merge_commit_interval_ms' = '10000'
4. Temporary "Band-aid" for Migration
If you must finish the migration quickly and have the CPU/IO overhead, you can temporarily raise the threshold where StarRocks starts slowing down ingestion:
* Shared-data (Lake): ADMIN SET FRONTEND CONFIG ("lake_ingest_slowdown_threshold" = "200");
* Shared-nothing: Increase cumulative_compaction_check_interval_seconds (lower it to check more often) or increase max_cumulative_compaction_num_singleton_deltas to allow more small files before they become a "critical" score.
Summary: Stop the migration, re-batch your data into files of ~500MB or 1M+ rows, and restart. Your compaction score will drop naturally as the system merges the existing small versions.
References
• administration/management/compaction.md
• knowledge/admin_and_operation/shared_data_compaction.md