Skip to content

ClickHouse Keeper: Fix endless logs when rotate_interval changed#28152

Merged
alesapin merged 4 commits intomasterfrom
fix_rotate_log_interval_change
Aug 27, 2021
Merged

ClickHouse Keeper: Fix endless logs when rotate_interval changed#28152
alesapin merged 4 commits intomasterfrom
fix_rotate_log_interval_change

Conversation

@alesapin
Copy link
Copy Markdown
Member

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Changelog category (leave one):

  • Bug Fix (user-visible misbehaviour in official stable or prestable release)

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix bug in clickhouse-keeper which can lead to endless logs when rotate_logs_interval decreased.

@robot-clickhouse robot-clickhouse added the pr-bugfix Pull request with bugfix, not backported by default label Aug 25, 2021

if (current_writer->getEntriesWritten() == rotate_interval)
const auto & current_changelog_description = existing_changelogs[current_writer->getStartIndex()];
const bool log_is_complete = current_writer->getEntriesWritten() == current_changelog_description.expectedEntriesCountInLog();
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Actually fix is this single line.

@alesapin alesapin added the jepsen-test Need to test this PR with jepsen tests label Aug 26, 2021
@alesapin
Copy link
Copy Markdown
Member Author

No related failures

@alesapin alesapin merged commit 44390a8 into master Aug 27, 2021
@alesapin alesapin deleted the fix_rotate_log_interval_change branch August 27, 2021 09:29
robot-clickhouse pushed a commit that referenced this pull request Aug 30, 2021
robot-clickhouse pushed a commit that referenced this pull request Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jepsen-test Need to test this PR with jepsen tests pr-bugfix Pull request with bugfix, not backported by default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants