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

Ignore frozen_metadata.txt while traversing shadow directory from system.remote_data_paths #70590

Merged
merged 5 commits into from
Oct 15, 2024

Conversation

aalexfvk
Copy link
Contributor

@aalexfvk aalexfvk commented Oct 11, 2024

When executing
select * from system.remote_data_paths SETTINGS traverse_shadow_remote_data_paths=1
we can get a parsing error, because frozen_metadata.txt (zero-copy replication related) files in frozen parts do not have a object disk metadata format.

2024.10.10 10:14:14.842950 [ 3285 ] {d82c32cb-72b6-46a8-9de1-ef70f880acc0} <Error> executeQuery: Code: 27. DB::Exception: Cannot parse input: expected '\t' before: '%Enet\ndefaul\n': While executing SystemRemoteDataPaths. (CANNOT_PARSE_INPUT_ASSERTION_FAILED) (version 24.8.4.13 (official build)) (from [::ffff:10.1.0.73]:58040) (in query:  SELECT obj_path, obj_size FROM _system.listing_objects_from_object_storage AS object_storage LEFT ANTI JOIN remoteSecure('hosts', system.remote_data_paths) AS object_table ON object_table.remote_path = object_storage.obj_path AND object_table.disk_name = 'object_storage' SETTINGS traverse_shadow_remote_data_paths=1 FORMAT TabSeparated ), Stack trace (when copying this message, always include the lines below):

0. DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000000daffc3b
1. DB::Exception::Exception(PreformattedMessage&&, int) @ 0x0000000007e59fcc
2. DB::Exception::Exception<String&>(int, FormatStringHelperImpl<std::type_identity<String&>::type>, String&) @ 0x0000000007e83d0b
3. DB::throwAtAssertionFailed(char const*, DB::ReadBuffer&) @ 0x000000000db78809
4. DB::DiskObjectStorageMetadata::deserialize(DB::ReadBuffer&) @ 0x00000000114360b6
5. DB::MetadataStorageFromDisk::readMetadataUnlocked(String const&, std::shared_lock<DB::SharedMutex>&) const @ 0x000000001143c4cc
6. DB::MetadataStorageFromDisk::getStorageObjects(String const&) const @ 0x000000001143cd1f
7. DB::SystemRemoteDataPathsSource::generate() @ 0x000000001081e1ed
8. DB::ISource::tryGenerate() @ 0x000000001303219b
9. DB::ISource::work() @ 0x0000000013031ea7
10. DB::ExecutionThreadContext::executeTask() @ 0x000000001304b0e7
11. DB::PipelineExecutor::executeStepImpl(unsigned long, std::atomic<bool>*) @ 0x000000001303f9b0
12. void std::__function::__policy_invoker<void ()>::__call_impl<std::__function::__default_alloc_func<DB::PipelineExecutor::spawnThreads()::$_0, void ()>>(std::__function::__policy_storage const*) @ 0x000000001304106e
13. ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::worker(std::__list_iterator<ThreadFromGlobalPoolImpl<false, true>, void*>) @ 0x000000000dbd4649
14. void std::__function::__policy_invoker<void ()>::__call_impl<std::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<false, true>::ThreadFromGlobalPoolImpl<void ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::scheduleImpl<void>(std::function<void ()>, Priority, std::optional<unsigned long>, bool)::'lambda0'()>(void&&)::'lambda'(), void ()>>(std::__function::__policy_storage const*) @ 0x000000000dbd8791
15. void* std::__thread_proxy[abi:v15007]<std::tuple<std::unique_ptr<std::__thread_struct, std::default_delete<std::__thread_struct>>, void ThreadPoolImpl<std::thread>::scheduleImpl<void>(std::function<void ()>, Priority, std::optional<unsigned long>, bool)::'lambda0'()>>(void*) @ 0x000000000dbd7509
16. ? @ 0x0000725a20a94ac3
17. ? @ 0x0000725a20b26850

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

Ignore frozen_metadata.txt while traversing shadow directory from system.remote_data_paths

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Information about CI checks: https://clickhouse.com/docs/en/development/continuous-integration/

CI Settings (Only check the boxes if you know what you are doing):

  • Allow: All Required Checks
  • Allow: Stateless tests
  • Allow: Stateful tests
  • Allow: Integration Tests
  • Allow: Performance tests
  • Allow: All Builds
  • Allow: batch 1, 2 for multi-batch jobs
  • Allow: batch 3, 4, 5, 6 for multi-batch jobs

  • Exclude: Style check
  • Exclude: Fast test
  • Exclude: All with ASAN
  • Exclude: All with TSAN, MSAN, UBSAN, Coverage
  • Exclude: All with aarch64, release, debug

  • Run only fuzzers related jobs (libFuzzer fuzzers, AST fuzzers, etc.)
  • Exclude: AST fuzzers

  • Do not test
  • Woolen Wolfdog
  • Upload binaries for special builds
  • Disable merge-commit
  • Disable CI cache

@aalexfvk aalexfvk changed the title Ignore frozen_metadata.txt while traversing shadow from system.remote_data_paths Ignore frozen_metadata.txt while traversing shadow directory from system.remote_data_paths Oct 11, 2024
@alexey-milovidov
Copy link
Member

I didn't know that such an obscure setting existed.
It has a mistake in the documentation:

Traverse shadow directory when query system.remote_data_paths

Let's fix the documentation. I will also be ok if we remove this setting altogether.

@kssenii kssenii self-assigned this Oct 14, 2024
@kssenii kssenii added the can be tested Allows running workflows for external contributors label Oct 14, 2024
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-bugfix Pull request with bugfix, not backported by default label Oct 14, 2024
@aalexfvk aalexfvk force-pushed the ignore_shadow_frozen_metadata branch from de8bff8 to 5d42b50 Compare October 14, 2024 09:14
@robot-ch-test-poll2
Copy link
Contributor

robot-ch-test-poll2 commented Oct 14, 2024

This is an automated comment for commit a67b0af with description of existing statuses. It's updated for the latest CI running

❌ Click here to open a full report in a separate page

Check nameDescriptionStatus
AST fuzzerRuns randomly generated queries to catch program errors. The build type is optionally given in parenthesis. If it fails, ask a maintainer for help❌ failure
Bugfix validationChecks that either a new test (functional or integration) or there some changed tests that fail with the binary built on master branch❌ failure
Successful checks
Check nameDescriptionStatus
BuildsThere's no description for the check yet, please add it to tests/ci/ci_config.py:CHECK_DESCRIPTIONS✅ success
ClickBenchRuns [ClickBench](https://github.com/ClickHouse/ClickBench/) with instant-attach table✅ success
Compatibility checkChecks that clickhouse binary runs on distributions with old libc versions. If it fails, ask a maintainer for help✅ success
Docker keeper imageThe check to build and optionally push the mentioned image to docker hub✅ success
Docker server imageThe check to build and optionally push the mentioned image to docker hub✅ success
Docs checkBuilds and tests the documentation✅ success
Fast testNormally this is the first check that is ran for a PR. It builds ClickHouse and runs most of stateless functional tests, omitting some. If it fails, further checks are not started until it is fixed. Look at the report to see which tests fail, then reproduce the failure locally as described here✅ success
Flaky testsChecks if new added or modified tests are flaky by running them repeatedly, in parallel, with more randomization. Functional tests are run 100 times with address sanitizer, and additional randomization of thread scheduling. Integration tests are run up to 10 times. If at least once a new test has failed, or was too long, this check will be red. We don't allow flaky tests, read the doc✅ success
Install packagesChecks that the built packages are installable in a clear environment✅ success
Integration testsThe integration tests report. In parenthesis the package type is given, and in square brackets are the optional part/total tests✅ success
Performance ComparisonMeasure changes in query performance. The performance test report is described in detail here. In square brackets are the optional part/total tests✅ success
Stateful testsRuns stateful functional tests for ClickHouse binaries built in various configurations -- release, debug, with sanitizers, etc✅ success
Stateless testsRuns stateless functional tests for ClickHouse binaries built in various configurations -- release, debug, with sanitizers, etc✅ success
Stress testRuns stateless functional tests concurrently from several clients to detect concurrency-related errors✅ success
Style checkRuns a set of checks to keep the code style clean. If some of tests failed, see the related log from the report✅ success
Unit testsRuns the unit tests for different release types✅ success
Upgrade checkRuns stress tests on server version from last release and then tries to upgrade it to the version from the PR. It checks if the new server can successfully startup without any errors, crashes or sanitizer asserts✅ success

@aalexfvk
Copy link
Contributor Author

Fixed documentation. I hope I made it clearer.

@kssenii it would be great to backport this small change.

docs/en/operations/settings/settings.md Outdated Show resolved Hide resolved
src/Core/Settings.cpp Outdated Show resolved Hide resolved
aalexfvk and others added 2 commits October 15, 2024 12:29
@kssenii
Copy link
Member

kssenii commented Oct 15, 2024

AST fuzzer (asan)

#56640

@aalexfvk
Copy link
Contributor Author

@kssenii Hello! Can we bring all backports to merging. Is it needed any assistance from my side ?

@kssenii
Copy link
Member

kssenii commented Oct 25, 2024

Hi @aalexfvk, I will do soon.

robot-ch-test-poll2 added a commit that referenced this pull request Oct 25, 2024
…d3deba828c9e18cee0080e35ad73b

Cherry pick #70590 to 24.8: Ignore frozen_metadata.txt while traversing shadow directory from system.remote_data_paths
robot-clickhouse added a commit that referenced this pull request Oct 25, 2024
…shadow directory from system.remote_data_paths
kssenii added a commit that referenced this pull request Oct 25, 2024
Backport #70590 to 24.8: Ignore frozen_metadata.txt while traversing shadow directory from system.remote_data_paths
robot-clickhouse-ci-2 added a commit that referenced this pull request Oct 25, 2024
…d3deba828c9e18cee0080e35ad73b

Cherry pick #70590 to 24.9: Ignore frozen_metadata.txt while traversing shadow directory from system.remote_data_paths
robot-clickhouse added a commit that referenced this pull request Oct 25, 2024
…shadow directory from system.remote_data_paths
robot-ch-test-poll3 added a commit that referenced this pull request Oct 25, 2024
…d3deba828c9e18cee0080e35ad73b

Cherry pick #70590 to 24.7: Ignore frozen_metadata.txt while traversing shadow directory from system.remote_data_paths
robot-clickhouse added a commit that referenced this pull request Oct 25, 2024
…shadow directory from system.remote_data_paths
robot-ch-test-poll4 added a commit that referenced this pull request Oct 25, 2024
Backport #70590 to 24.9: Ignore frozen_metadata.txt while traversing shadow directory from system.remote_data_paths
alexey-milovidov added a commit that referenced this pull request Oct 26, 2024
Backport #70590 to 24.7: Ignore frozen_metadata.txt while traversing shadow directory from system.remote_data_paths
robot-ch-test-poll3 added a commit that referenced this pull request Oct 28, 2024
…d3deba828c9e18cee0080e35ad73b

Cherry pick #70590 to 24.3: Ignore frozen_metadata.txt while traversing shadow directory from system.remote_data_paths
robot-clickhouse added a commit that referenced this pull request Oct 28, 2024
…shadow directory from system.remote_data_paths
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Oct 28, 2024
kssenii added a commit that referenced this pull request Oct 28, 2024
Backport #70590 to 24.3: Ignore frozen_metadata.txt while traversing shadow directory from system.remote_data_paths
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
can be tested Allows running workflows for external contributors pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-backports-created-cloud pr-bugfix Pull request with bugfix, not backported by default pr-must-backport Pull request should be backported intentionally. Use this label with great care! pr-synced-to-cloud The PR is synced to the cloud repo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants