Skip to content

Export part/ partition - split file export might lose data after crash #2311

Description

@arthurpassos

The issue can happen in the following scenario:

When the export pipeline decides to split a merge tree file into multiple parquet files, and the export_merge_tree_part_file_already_exists_policy setting is set to SKIP (the default) and clickhouse crashes after the first file has been exported.

In such scenario, when the task is resumed, the file writer will try to export that same part again. When it generates the first filename, it will realize it already exists and skip it without the knowledge that there would be more files.

It doesn't have that knowledge because file splitting is done on the fly and not pre-computed.

The export will eventually be marked as completed with missing files, leading to corrupted data.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions