Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix segfault on attach parititon #31738

Merged
merged 2 commits into from
Nov 30, 2021
Merged

Conversation

tavplubix
Copy link
Member

@tavplubix tavplubix commented Nov 24, 2021

Changelog category (leave one):

  • Bug Fix (user-visible misbehaviour in official stable or prestable release)

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fixed rare segfault on concurrent ATTACH PARTITION queries.

Detailed description / Documentation draft:
Also removed some bad code

https://clickhouse-test-reports.s3.yandex.net/30599/200913a5a575ffb03a0307c68da4162c9844acbb/stress_test_(address).html#fail1

@robot-clickhouse robot-clickhouse added the pr-bugfix Pull request with bugfix, not backported by default label Nov 24, 2021
@tavplubix tavplubix force-pushed the fix_segfault_on_attach_partition branch from ad7fe45 to 1ab8b5d Compare November 25, 2021 10:04
@KochetovNicolai KochetovNicolai self-assigned this Nov 29, 2021
{
String old_name;
String new_name;
DiskPtr disk;
Copy link
Member

Choose a reason for hiding this comment

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

As I can guess, both old and new part should be on the same disk?
Maybe add a comment here ...

Comment on lines 36 to 37
export -f thread_detach_attach;
export -f thread_detach_attach;
Copy link
Member

Choose a reason for hiding this comment

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

thread_drop_detached?

Comment on lines 42 to 44
timeout $TIMEOUT bash -c thread_detach_attach 2> /dev/null &
timeout $TIMEOUT bash -c thread_detach_attach 2> /dev/null &
timeout $TIMEOUT bash -c thread_detach_attach 2> /dev/null &
Copy link
Member

Choose a reason for hiding this comment

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

thread_drop_detached somewhere?

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.

None yet

3 participants