Skip to content

ALTER TABLE ... FREEZE PARTITION sometimes returns 'File not found' error #393

Closed

Description

@valyala

We periodically make full table backups using the following query via web API:

ALTER TABLE events FREEZE PARTITION '2'

Sometimes it returns the following error:

Poco::Exception. Code: 1000, e.code() = 2, e.displayText() = File not found: /opt/clickhouse/data/default/events/20170125_20170125_16903298_16903306_1, e.what() = File not found

But despite of the error it creates the corresponding backup in the /opt/clickhouse/shadow directory.

This looks like a data race.

Clickhouse server version is 1.1.54134.

Activity

  1. gudmojo commented on Oct 12, 2017

    @gudmojo
  2. alexey-milovidov commented on Oct 12, 2017

    @alexey-milovidov
    Member

    This is a bug. Fixed in:
    d468473

  3. gudmojo commented on Dec 1, 2017

    @gudmojo

    @alexey-milovidov thank you. I'm getting this again on a version that has the fix. Using version 1.1.54304 and getting this in my application:

    Nov 30 14:15:27 ALTER table mydatabase.mytable_1day FREEZE PARTITION '201711'
    Nov 30 14:15:37 Unknown error field: Poco::Exception. Code: 1000
    Nov 30 14:15:37 Unknown error field: e.code() = 2
    Nov 30 14:15:37 Unknown error field: e.displayText() = File not found: /var/lib/clickhouse/data/mydatabase/mytable_1day/20171130_20171130_22782825_22782825_0
    Nov 30 14:15:37 { Error: Poco::Exception. Code: 1000, e.code() = 2, e.displayText() = File not found: /var/lib/clickhouse/data/mydatabase/mytable_1day/20171130_20171130_22782825_22782825_0, e.what() = File not found
    Nov 30 14:15:37
    Nov 30 14:15:37 at parseError (/code/node_modules/@apla/clickhouse/src/parse-error.js:2:15)
    Nov 30 14:15:37 at errorHandler (/code/node_modules/@apla/clickhouse/src/clickhouse.js:26:13)
    Nov 30 14:15:37 at IncomingMessage. (/code/node_modules/@apla/clickhouse/src/clickhouse.js:94:11)
    Nov 30 14:15:37 at emitNone (events.js:110:20)
    Nov 30 14:15:37 at IncomingMessage.emit (events.js:207:7)
    Nov 30 14:15:37 at endReadableNT (_stream_readable.js:1059:12)
    Nov 30 14:15:37 at _combinedTickCallback (internal/process/next_tick.js:138:11)
    Nov 30 14:15:37 at process._tickCallback (internal/process/next_tick.js:180:9) type: 'File not found' }

    The freeze statements are possibly being issued concurrently, not sure if that is not allowed.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions