Skip to content

Refreshable Materialized Views autostart after server restart #81840

@dkarelov

Description

@dkarelov

Company or project name

No response

Describe the unexpected behaviour

RMV are refreshed immediately after server restarts, instead of just being scheduled at a proper time.
That makes impossible to use RMVs with APPEND on a basic MergeTree engine as the RMVs that are scheduled to run daily start to produce duplicates if there was a server restart during the day.

Which ClickHouse versions are affected?

25.03 LTS

How to reproduce

Example: RMV is scheduled to run at 00:05. At 00:00 the server is restarted and RMV is immediately run. Then it runs again at 00:05.

Expected behavior

RMV is not refreshed immediately after restart - just scheduled to run normally at 00:05.

Error message and/or stacktrace

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    unexpected behaviourResult is unexpected, but not entirely wrong at the same time.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions