Skip to content

Commit 00befb0

Browse files
morningmanclaude
andcommitted
[fix](ivm) Correct the margin in the description of ivm_stream_keepalive_interval_second
### What problem does this PR solve? Issue Number: None Related PR: #69831 Problem Summary: The description of `ivm_stream_keepalive_interval_second` asked for an interval of at most half the shortest `changelog.ttl_seconds` of the IVM base tables, a bound that leaves a refresh no time. A partition is renewed at the first check after less than half the TTL is left, so when an idle partition is written, the newer of its offset and its keep-alive TSO is up to half the TTL plus one interval old, and one interval older for each check that could not renew it: a round that cannot reach MetaService, finds a lock busy or fails to get a TSO records nothing and leaves the partition to the next one. After the write the partition is not renewed any more, and the refresh that reads the write falls back to COMPLETE (a strict INCREMENTAL refresh fails) once that TSO is older than the TTL. So a refresh is sure to be incremental only if it starts within half the TTL minus the interval after the write, one interval less for each check that could not renew the partition: 11 hours 50 minutes with the defaults (a TTL of a day, 600 seconds), and no time at all at the bound the description gave. The description now states that time and asks for an interval well under half the TTL. A failed round is still left to the next one: retrying it sooner would not change the bound, and a cloud round first advances MetaService's TSO fence, so a faster retry while MetaService is failing would write to it more often. ### Release note None ### Check List (For Author) - Test: No need to test (only the description of a config changes); checkstyle passes for fe-common. - Behavior changed: No - Does this need documentation: No Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent bcbfdd1 commit 00befb0

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

  • fe/fe-common/src/main/java/org/apache/doris/common

‎fe/fe-common/src/main/java/org/apache/doris/common/Config.java‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3184,12 +3184,15 @@ public void handle(Field field, String value) throws Exception {
31843184
public static boolean enable_ivm_stream_keepalive = true;
31853185

31863186
@ConfField(mutable = true, masterOnly = true, description = "The interval at which FE checks the idle partitions "
3187-
+ "of IVM streams for a keep-alive TSO, in seconds. A partition is renewed once less than half of its "
3188-
+ "base table's changelog.ttl_seconds is left, so keep this at most half the shortest "
3189-
+ "changelog.ttl_seconds of the IVM base tables: with a longer interval, the keep-alive TSO of such a "
3190-
+ "table expires between two checks, and a refresh after its partitions have been idle falls back to "
3191-
+ "COMPLETE, as it does without the keep-alive. A shorter interval costs more checks, not more edit "
3192-
+ "logs. A change applies within a second.",
3187+
+ "of IVM streams for a keep-alive TSO, in seconds. A partition is renewed at the first check after less "
3188+
+ "than half of its base table's changelog.ttl_seconds is left, and not any more once it is written. So "
3189+
+ "the refresh that reads a write to a partition that had been idle is incremental if it starts within "
3190+
+ "half the TTL minus this interval after the write (11 hours 50 minutes with the defaults), a time that "
3191+
+ "shrinks by one interval for each check that could not renew the partition, for example because "
3192+
+ "MetaService was unavailable; a later refresh can fall back to COMPLETE, as it does without the "
3193+
+ "keep-alive. Keep this well under half the shortest changelog.ttl_seconds of the IVM base tables: at "
3194+
+ "half, no time is left. A shorter interval costs more checks, not more edit logs. A change applies "
3195+
+ "within a second.",
31933196
varType = VariableAnnotation.EXPERIMENTAL)
31943197
public static int ivm_stream_keepalive_interval_second = 600;
31953198

0 commit comments

Comments
 (0)