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 FileLog engine unnesessary create meta data directory when create table failed #31967

Merged
merged 2 commits into from
Nov 30, 2021

Conversation

ucasfl
Copy link
Collaborator

@ucasfl ucasfl commented Nov 30, 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):
Fix FileLog engine unnesessary create meta data directory when create table failed. Fix #31962.

@robot-clickhouse robot-clickhouse added the pr-bugfix Pull request with bugfix, not backported by default label Nov 30, 2021
@kssenii kssenii self-assigned this Nov 30, 2021
@@ -0,0 +1,3 @@
CREATE TABLE log (A String) ENGINE= FileLog('/tmp/aaa.csv', 'CSV'); -- {serverError 36 }
CREATE TABLE log (A String) ENGINE= FileLog('/tmp/aaa.csv', 'CSV'); -- {serverError 36 }
CREATE TABLE log (A String) ENGINE= FileLog('/tmp/aaa.csv', 'CSV'); -- {serverError 36 }
Copy link
Member

Choose a reason for hiding this comment

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

May be in this test after creating file log engine with incorrect path, test creating with correct path (so it would be same as in the issue)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If creating with correct path after creating with incorrect path, it will success.

Copy link
Member

Choose a reason for hiding this comment

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

I believe. Ok I see that is not easy to add such test because in will have to be .sh test and .sh test does not allow test hints to suppress expected error. Then ok as it is now.

Copy link
Member

Choose a reason for hiding this comment

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

Hm, no, actually it is ok to add one more sh test.
(I believe that it works, but it might get broken in the future again)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

OK.

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.

FileLog is able to read files only in /var/lib/clickhouse/user_files/
3 participants