You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ch...@apache.org on 2026/10/21 00:26:31 UTC
(kafka) branch 4.4 updated: MINOR: Update document for KIP-1241 (#23520)
This is an automated email from the ASF dual-hosted git repository.
chia7712 pushed a commit to branch 4.4
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/4.4 by this push:
new f42627614a0 MINOR: Update document for KIP-1241 (#23520)
f42627614a0 is described below
commit f42627614a020ad5219a44b810816e0cd0137e8c
Author: Jian <fu...@gmail.com>
AuthorDate: Wed Oct 21 08:25:41 2026 +0800
MINOR: Update document for KIP-1241 (#23520)
Add a “Delay Upload” section to the tiered storage docs for the
remote.copy.lag.ms and remote.copy.lag.bytes configs introduced by
KIP-1241.
The section explains why segments are stored redundantly in both tiers
during the local retention window, how the two lag checks decide when a
segment becomes eligible for upload (either check satisfied, 0 means
upload immediately, -1 follows local retention), and gives two examples:
a time-based delay and a size-based delay. It also mentions the
broker-level counterparts log.remote.copy.lag.ms and
log.remote.copy.lag.bytes.
Follow-up of
https://github.com/apache/kafka/pull/22394#issuecomment-5029666292.
Reviewers: Chia-Ping Tsai <ch...@gmail.com>
---
docs/operations/tiered-storage.md | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/docs/operations/tiered-storage.md b/docs/operations/tiered-storage.md
index 021dddea8fc..ad679329ded 100644
--- a/docs/operations/tiered-storage.md
+++ b/docs/operations/tiered-storage.md
@@ -167,6 +167,37 @@ $ bin/kafka-topics.sh --delete --topic tieredTopic --bootstrap-server localhost:
After topics are deleted, you're safe to set `remote.log.storage.system.enable=false` in the broker configuration.
+## Delay Upload
+
+By default, non-active log segments are uploaded to remote storage as soon as they are eligible, keeping data in remote storage as up to date as possible. As a result, some segments before local retention are stored redundantly in both the local and remote tiers. If you do not need remote storage to always hold the newest data, you can delay upload with `remote.copy.lag.ms` and `remote.copy.lag.bytes` to reduce this redundancy and save remote storage space. The remote log manager uses th [...]
+
+For example, assume a topic with 7-day overall retention, 3-day local retention, and no size limits:
+
+```properties
+retention.ms=604800000
+retention.bytes=-1
+local.retention.ms=259200000
+local.retention.bytes=-1
+```
+
+* Delay upload by 1 day (so remote storage does not hold a redundant copy of the newest day of data). Because `local.retention.bytes` is unlimited, the default `remote.copy.lag.bytes=-1` does not enable a size-based check:
+
+```properties
+# 1 day. Default is 0 (upload immediately).
+remote.copy.lag.ms=86400000
+```
+
+* Delay upload until there is at least 10 GiB of newer local data after a segment. Do not leave `remote.copy.lag.ms` at its default of 0, or uploads remain immediately eligible; set it to `-1` so the time-based check follows `local.retention.ms` (3 days). A segment becomes eligible when either the size lag or the time lag is met:
+
+```properties
+# Follow local.retention.ms (3 days). Default is 0 (upload immediately).
+remote.copy.lag.ms=-1
+# 10 GiB. Default is -1 (follow local.retention.bytes).
+remote.copy.lag.bytes=10737418240
+```
+
+For more examples and information, please check [KIP-1241](https://cwiki.apache.org/confluence/x/A4LMFw).
+
## Limitations
While the Tiered Storage works for most use cases, it is still important to be aware of the following limitations: