Skip to content

buffer: warn if default timekey (1d) will be used#5276

Merged
Watson1978 merged 1 commit intofluent:masterfrom
kenhys:warn-default-buffer-timekey
Mar 13, 2026
Merged

buffer: warn if default timekey (1d) will be used#5276
Watson1978 merged 1 commit intofluent:masterfrom
kenhys:warn-default-buffer-timekey

Conversation

@kenhys
Copy link
Contributor

@kenhys kenhys commented Mar 12, 2026

Which issue(s) this PR fixes:
Fixes #

What this PR does / why we need it:

By default, the value of timekey interval was set as interval 1d. Without changing flush related parameters, it will not be flushed at all in that period. This behavior is intentional design, but it might be surprised in some use cases.

So, in some doubtful use-case, emit warning for it.

Before:

  no buffer configuration # no warning

  <buffer>
    @type file # no warning
  </buffer>

  <buffer time>
    @type file # no warning
  </buffer>

  <buffer []>
    @type file # no warning
  </buffer>

After:

  no buffer configuration # warning

  <buffer>
    @type file # warning
  </buffer>

  <buffer time>
    @type file # warning
  </buffer>

  <buffer []>
    @type file # no warning
  </buffer>

Docs Changes:

N/A

Release Note:

N/A

By default, the value of timekey interval was set as interval
1d. Without changing flush related parameters, it will not be flushed
at all in that period. This behavior is intentional design, but it
might be surprised in some use cases.

So, in some doubtful use-case, emit warning for it.

Before:

  no buffer configuration # no warning

  <buffer>
    @type file # no warning
  </buffer>

  <buffer time>
    @type file # no warning
  </buffer>

  <buffer []>
    @type file # no warning
  </buffer>

After:

  no buffer configuration # warning

  <buffer>
    @type file # warning
  </buffer>

  <buffer time>
    @type file # warning
  </buffer>

  <buffer []>
    @type file # no warning
  </buffer>

Signed-off-by: Kentaro Hayashi <hayashi@clear-code.com>
Copy link
Contributor

@Watson1978 Watson1978 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

@Watson1978 Watson1978 added this to the v1.20.0 milestone Mar 13, 2026
@Watson1978 Watson1978 added the backport to v1.19 We will backport this fix to the LTS branch label Mar 13, 2026
@Watson1978 Watson1978 merged commit b819ccf into fluent:master Mar 13, 2026
21 checks passed
@kenhys kenhys deleted the warn-default-buffer-timekey branch March 16, 2026 03:40
github-actions bot pushed a commit that referenced this pull request Mar 22, 2026
**Which issue(s) this PR fixes**:
Fixes #

**What this PR does / why we need it**:

By default, the value of timekey interval was set as interval 1d.
Without changing flush related parameters, it will not be flushed at all
in that period. This behavior is intentional design, but it might be
surprised in some use cases.

So, in some doubtful use-case, emit warning for it.

```
Before:

  no buffer configuration # no warning

  <buffer>
    @type file # no warning
  </buffer>

  <buffer time>
    @type file # no warning
  </buffer>

  <buffer []>
    @type file # no warning
  </buffer>

After:

  no buffer configuration # warning

  <buffer>
    @type file # warning
  </buffer>

  <buffer time>
    @type file # warning
  </buffer>

  <buffer []>
    @type file # no warning
  </buffer>

```

**Docs Changes**:

N/A

**Release Note**:

N/A

Signed-off-by: Kentaro Hayashi <hayashi@clear-code.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport to v1.19 We will backport this fix to the LTS branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants