Skip to content

Allowed to have some parts on destination disk or volume in MOVE PARTITION#7434

Merged
alesapin merged 4 commits intoClickHouse:masterfrom
excitoon-favorites:fix-7424
Oct 24, 2019
Merged

Allowed to have some parts on destination disk or volume in MOVE PARTITION#7434
alesapin merged 4 commits intoClickHouse:masterfrom
excitoon-favorites:fix-7424

Conversation

@excitoon
Copy link
Copy Markdown
Contributor

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

For changelog. Remove if this is non-significant change.

Category (leave one):

  • Bug Fix

Short description (up to few sentences):

Allowed to have some parts on destination disk or volume in MOVE PARTITION.

Fixes #7424

@alesapin alesapin self-assigned this Oct 22, 2019
Copy link
Copy Markdown
Member

@alesapin alesapin left a comment

Choose a reason for hiding this comment

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

It's very easy to test with the integration test. Just move one part with ALTER TABLE MOVE PART and then try to move partition.

}
else
{
LOG_DEBUG(log, "No parts of partition " << partition_id << " to move to disk " << disk->getName());
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should throw an exception here, all parts already on the destionation disk.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

}
else
{
LOG_DEBUG(log, "No parts of partition " << partition_id << " to move to volume " << volume->getName());
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Throw exception. User should know about it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@alesapin alesapin added the pr-bugfix Pull request with bugfix, not backported by default label Oct 23, 2019
@excitoon
Copy link
Copy Markdown
Contributor Author

@alesapin

It's very easy to test with the integration test. Just move one part with ALTER TABLE MOVE PART and then try to move partition.

3debdc2

@excitoon excitoon requested a review from alesapin October 24, 2019 09:16
Copy link
Copy Markdown
Member

@alesapin alesapin left a comment

Choose a reason for hiding this comment

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

Need to fix exception text.

@excitoon excitoon requested a review from alesapin October 24, 2019 10:57
@alesapin alesapin merged commit 5d8d1df into ClickHouse:master Oct 24, 2019
akuzm pushed a commit that referenced this pull request Oct 29, 2019
Allowed to have some parts on destination disk or volume in MOVE PARTITION

(cherry picked from commit 5d8d1df)
akuzm pushed a commit that referenced this pull request Oct 29, 2019
Allowed to have some parts on destination disk or volume in MOVE PARTITION

(cherry picked from commit 5d8d1df)
@akuzm akuzm added the v19.16 label Oct 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-bugfix Pull request with bugfix, not backported by default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MOVE PARTITION tries to move parts to the same disk where they already belong

4 participants