Skip to content

introduce ISystemLogFlushPolicy interface in SystemLog - #100314

Merged
bharatnc merged 2 commits into
masterfrom
ncb/system-log-flush-policy
Mar 23, 2026
Merged

bharatnc merged 2 commits into
masterfrom
ncb/system-log-flush-policy

Conversation

@bharatnc

@bharatnc bharatnc commented Mar 22, 2026 •

Copy link
Copy Markdown
Contributor

This PR is required for internal logging use case. It introduces ISystemLogFlushPolicy, an interface that abstracts flush behavior in SystemLog. This provides a clean extension point for future implementations without modifying SystemLog directly. DefaultSystemLogFlushPolicy is included as the base implementation (it preserves the current flush behavior).

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

...

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Version info

  • Merged into: 26.4.1.144

@bharatnc
bharatnc requested a review from mstetsyuk March 22, 2026 01:53
@clickhouse-gh

clickhouse-gh Bot commented Mar 22, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [d19a09e]

Summary: ❌

job_name test_name status info comment
Stress test (arm_asan_ubsan, s3) failure
Hung check failed, possible deadlock found FAIL cidb, issue ISSUE CREATED
Stress test (amd_msan) failure
Logical error: '(isConst() || isSparse() || isReplicated()) ? getDataType() == rhs.getDataType() : typeid(*this) == typeid(rhs)' (STID: 2508-35de) FAIL cidb, issue ISSUE CREATED
AST fuzzer (arm_asan_ubsan) failure
Logical error: Filter column for arrayRemove was not evaluated as ColumnUInt8 but as A (STID: 3494-6a86) FAIL cidb, issue ISSUE CREATED

AI Review

Summary

This PR introduces ISystemLogFlushPolicy and wires SystemLog to delegate flush-related behavior to a policy object, with DefaultSystemLogFlushPolicy preserving current behavior. I did not find correctness, safety, or compatibility regressions in the current OSS implementation.

Missing context

  • ⚠️ No CI logs or benchmark results were provided in this review context.

ClickHouse Rules

Item Status Notes
Deletion logging ➖
Serialization versioning ➖
Core-area scrutiny ✅
No test removal ✅
Experimental gate ➖
No magic constants ✅
Backward compatibility ✅
SettingsChangesHistory.cpp ➖
PR metadata quality ✅
Safe rollout ✅
Compilation time ✅

Final Verdict

  • Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Mar 22, 2026
Comment thread src/Interpreters/SystemLogFlushPolicy.h Resolved
@clickhouse-gh

clickhouse-gh Bot commented Mar 23, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 83.90% 83.90% +0.00%
Functions 24.80% 24.80% +0.00%
Branches 76.50% 76.50% +0.00%

PR changed lines: PR changed-lines coverage: 86.54% (45/52, 0 noise lines excluded)
Diff coverage report
Uncovered code

@bharatnc
bharatnc marked this pull request as ready for review March 23, 2026 09:42
@bharatnc
bharatnc added this pull request to the merge queue Mar 23, 2026
Merged via the queue into master with commit d7f2361 Mar 23, 2026
289 of 296 checks passed
@bharatnc
bharatnc deleted the ncb/system-log-flush-policy branch March 23, 2026 12:48
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-synced-to-cloud The PR is synced to the cloud repo label Mar 23, 2026
alexey-milovidov added a commit that referenced this pull request Apr 26, 2026
`clickhouse-test` randomizes `use_skip_indexes_on_data_read` between 0 and 1
in its random-settings rotation, which made the bugfix-validation runs of
`04117_skip_index_after_alter_modify_column` and `04118_..._replicated`
flaky: when randomized to 0, the data-read phase is bypassed entirely and
the bug (incorrect index data being applied with the new column type) does
not manifest, even on master.

Set the option explicitly in every assertion query so the data-read phase
is always exercised. Also update the comments to reflect that the active
fix is in `supportsSkipIndexesOnDataRead` (the data-read phase guard) — the
`MutationsSnapshot::getAllUpdatedColumns` change in this PR is now dead
code on master after the `AlterConversions` refactor in #100314, but is
kept for defensive correctness of the virtual override.

https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=100526&sha=115d1948c0889f3687565fe9995a066c5ec37e31&name_0=PR&name_1=Bugfix%20validation%20%28functional%20tests%29

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-not-for-changelog This PR should not be mentioned in the changelog pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants