Skip to content

Integration of log storage engines with IDisk interface#8356

Merged
alexey-milovidov merged 20 commits intoClickHouse:masterfrom
Alex-Burmak:vfs_log
Jan 12, 2020
Merged

Integration of log storage engines with IDisk interface#8356
alexey-milovidov merged 20 commits intoClickHouse:masterfrom
Alex-Burmak:vfs_log

Conversation

@Alex-Burmak
Copy link
Copy Markdown
Contributor

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

Changelog category (leave one):

  • Non-significant (changelog entry is not needed)

Changelog entry (up to few sentences, required except for Non-significant/Documentation categories):

Detailed description (optional):

These are followup changes for #7946 that integrate log storage engines with IDisk interface.

@alesapin alesapin self-requested a review December 25, 2019 12:39
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.

Almost ok, need to rename some methods. and merge with master :(
Also maybe we need some lightweight class for Path representation? Very often you wrap your String path into Poco::Path.

@Alex-Burmak
Copy link
Copy Markdown
Contributor Author

Also maybe we need some lightweight class for Path representation? Very often you wrap your String path into Poco::Path.

When dealing with paths and IDisk interface, Poco::Path is currently used only for getting file name from path and getting parent path. So it would probably better to just add two utility functions for these use cases.

@alesapin
Copy link
Copy Markdown
Member

Build failed, but it's CI error.

: storage(storage_),
lock(storage.rwlock),
marks_stream(storage.marks_file.path(), 4096, O_APPEND | O_CREAT | O_WRONLY)
marks_stream(fullPath(storage.disk, storage.marks_file_path), 4096, O_APPEND | O_CREAT | O_WRONLY)
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.

It's not integrated.

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.

All right. Only StorageTinyLog is fully integrated. It's left a few places in StorageLog and StorageStripeLog that require additional changes in buffer classes. I'd prefer to cover it in a separate PR.

}
else
Poco::File(tmp_files_info_path).renameTo(files_info_path);
disk->moveFile(tmp_files_info_path, files_info_path);
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.

Changed semantics.

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.

Fixed by extending IDisk with replaceFile() method.

Copy link
Copy Markdown
Member

@alexey-milovidov alexey-milovidov left a comment

Choose a reason for hiding this comment

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

.

@tavplubix
Copy link
Copy Markdown
Member

Looks like unit tests was broken here: Unit tests — fail: 0, passed: 42

...
[----------] 1 test from ReadBufferAIOTest
[ RUN      ] ReadBufferAIOTest.TestReadAfterAIO
Segmentation fault (core dumped)

https://clickhouse-test-reports.s3.yandex.net/0/303b146a93a49ae72d5762b2dfd890cd619f8971/unit_tests/test_run.txt.out.log

Previous mergecommit in master (c2370b2):
Unit tests — fail: 0, passed: 5097
https://clickhouse-test-reports.s3.yandex.net/0/c2370b2e470f99531929b5c40454806bde1710c7/unit_tests/test_run.txt.out.log

azat added a commit to azat/ClickHouse that referenced this pull request Jan 7, 2021
But this may cause troubles, another option will be to split finalize()
into finalize(bool sync) and finalizeImpl()

This was introduced in ClickHouse#8356
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants