Skip to content

Failed to merge parts because of inconsistent leader #1808

Closed

Description

@dqminh

We had a table that failed to merge its parts.

SELECT
    count(),
    database
FROM system.parts
WHERE table = 'table_name'
GROUP BY database

┌─count()─┬─database─┐
│    1000 │ r2       │
│      10 │ r0       │
│      17 │ r1       │
└─────────┴──────────┘

When trying to do optimize manually on the table

:) optimize table r2.table_name partition '201801'

OPTIMIZE TABLE r2.table_name PARTITION '201801'

Received exception from server:
Code: 292. DB::Exception: Received from current_host:9000, current_ip. DB::Exception: Received from remote_host:9000, remote_ip. DB::Exception: Leader was suddenly changed or logical error..

Restart the remote host, then optimize table works without errors and the replicated table seems to be able to merge again.

Activity

  1. blinkov commented on Sep 17, 2018

    @blinkov
    Contributor

    @dqminh can you provide an instruction on how to reproduce this?

  2. added
    st-need-info
    on Sep 17, 2018
  3. dqminh commented on Sep 24, 2018

    @dqminh
    ContributorAuthor

    Sorry, this was a while ago and we couldnt replicate it even at the time IIRC. We havent seen the same error so far after a few version upgrades i think so I guess we can close this.

  4. added a commit that references this issue on Jun 4, 2026
  5. added 2 commits that reference this issue on Aug 13, 2026
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

    st-need-info

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions