Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Public Interfaces

This KIP introduces:

(1) one Two new topic configuration itemitems:  remote.copy.lazy.enablelag.ms and remote.copy.lag.bytes
BTW:  topic's remote storage feature already had some others configure items such as remote.log.delete.on.disable, remote.log.copy.disable, etc.
Considering that if we need to keep the same style. the configure name shoud be remote.log.copy.lazylag.enablems/bytes. thus. the broker configure will be log.remote.log.copy.lazylag.ms/bytes. enable so that it look strange with duplicated "log". So decide to use this name style without "log".


Code Block
languagejava
titleclients/src/main/java/org/apache/kafka/common/config/TopicConfig.java‎
    public static final String REMOTE_COPY_LAZYLAG_ENABLEMS_CONFIG = "remote.copy.lazylag.enablems";
    public static final String REMOTE_COPY_LAZYLAG_ENABLEMS_DOC = "DeterminesControls how whetherlong to delay uploading segments to remote storage. " +
            "When set to false0 (default), all non-active segments will be uploaded immediately without checking local retention constraints segments are uploaded as soon as they are eligible (no delay). " +
            "When set to -1, resolves to <code>local.retention.ms</code> (maximum delay). " +
            "When set to a positive value (ms), a segment is eligible for upload only after it has been closed for at least this many milliseconds. " +
            "The value should not exceed <code>local.retention.ms</code> (local retention time).";

    public static final String REMOTE_COPY_LAG_BYTES_CONFIG = "remote.copy.lag.bytes";
    public static final String REMOTE_COPY_LAG_BYTES_DOC = "Controls size-based delay for uploading segments to remote storage. " +
            "When set to true0 (default), segments within local retention will not be uploaded, the upload is delayed until they expire.";
 are uploaded as soon as they are eligible (no size-based constraint). " +
            "When set to -1, resolves to <code>local.retention.bytes</code> (maximum delay). " +
            "When set to a positive value (bytes), a segment is eligible for upload only when at least this many bytes of log data exist after the segment. " +
            "The value should not exceed <code>local.retention.bytes</code> (local retention size).";

(2) Two new server configuration items(2) one new server configuration item log.remote.copy.lazy.enable.lag.ms and log.remote.copy.lag.bytes
If a user wants to enable the lazy copy behaviour for all the topics (including the new ones), then they can set this broker level config to trueconfigs. Otherwise,
it will be hard for the user to create the new topics with this config these configs set when remote storage is enabled.

...