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

Update check-large-objects.sh to be language neutral #61130

Merged
merged 5 commits into from
Mar 16, 2024

Conversation

wudanzy
Copy link
Contributor

@wudanzy wudanzy commented Mar 10, 2024

The previous implementation uses total keyword to filter out lines that contains the total size of objects under a directory. But when the OS uses other language, it fails to filter out that line, so the script would fail.

This implementation changes the script to match only lines that contains object file by their extension. This implementation would be language neutral.

Changelog category (leave one):

  • Not for changelog

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

Update check-large-objects.sh to be language neutral

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/

Dan Wu added 2 commits March 10, 2024 20:42
The previous implementation uses `total` keyword to filter out lines that contains the total size of objects under a directory. But when the OS uses other language, it fails to filter out that line, so the script would fail. 

This implementation changes the script to match only lines that contains object file by their extension. This implementation would be language neutral.
Update check-large-objects.sh to be language neutral
@CLAassistant
Copy link

CLAassistant commented Mar 10, 2024

CLA assistant check
All committers have signed the CLA.

@wudanzy
Copy link
Contributor Author

wudanzy commented Mar 10, 2024

Seems like I need to ask for approval if I am asked to sign a CLA, according to my Company's policy. I need to figure that out.

@alexey-milovidov alexey-milovidov self-assigned this Mar 10, 2024
@robot-clickhouse robot-clickhouse added the pr-not-for-changelog This PR should not be mentioned in the changelog label Mar 10, 2024
@robot-clickhouse
Copy link
Member

robot-clickhouse commented Mar 10, 2024

This is an automated comment for commit 2661890 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
CI runningA meta-check that indicates the running CI. Normally, it's in success or pending state. The failed status indicates some problems with the PR⏳ pending
Successful checks
Check nameDescriptionStatus
A SyncThere'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
ClickHouse build checkBuilds ClickHouse in various configurations for use in further steps. You have to fix the builds that fail. Build logs often has enough information to fix the error, but you might have to reproduce the failure locally. The cmake options can be found in the build log, grepping for cmake. Use these options and follow the general build process✅ 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. Integrational 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
Mergeable CheckChecks if all other necessary checks are successful✅ success
PR CheckThere's no description for the check yet, please add it to tests/ci/ci_config.py:CHECK_DESCRIPTIONS✅ 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

@wudanzy
Copy link
Contributor Author

wudanzy commented Mar 12, 2024

I see there are two checks failed, because I need 'can be tested' label. But since this PR is very small, I think it would be fine to skip those tests.

@alexey-milovidov alexey-milovidov added the can be tested Allows running workflows for external contributors label Mar 12, 2024
@wudanzy
Copy link
Contributor Author

wudanzy commented Mar 12, 2024

I see that two fuzzy test failed, is there a guideline for debugging fuzzy test? How can we know which query caused the error?

Logical error: 'Unexpected return type from equals. Expected Nullable. Got UInt8'.

@wudanzy
Copy link
Contributor Author

wudanzy commented Mar 12, 2024

Seems like the detailed error is here:

Error on processing query 'SELECT s FROM buffer_table1__fuzz_25 PREWHERE x = materialize(1)': Received from localhost:9000. DB::Exception: Illegal types of arguments (Array(Nullable(Float64)), UInt8) of function equals: While processing x = materialize(1). Stack trace:

  1. /build/contrib/llvm-project/libcxx/include/exception:141: std::exception::capture() @ 0x000000000aa1f582
  2. /build/contrib/llvm-project/libcxx/include/exception:116: std::exception::exceptionabi:v15000 @ 0x000000000aa1f54d
  3. /build/base/poco/Foundation/src/Exception.cpp:27: Poco::Exception::Exception(String const&, int) @ 0x00000000233b6c60
  4. /build/src/Common/Exception.cpp:94: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x0000000013687dce
  5. /build/src/Common/Exception.h:90: DB::Exception::Exception(String&&, int, bool) @ 0x000000000aa1450a
  6. /build/src/Common/Exception.h:109: DB::Exception::Exception<String, String, String>(int, FormatStringHelperImpl<std::type_identity::type, std::type_identity::type, std::type_identity::type>, String&&, String&&, String&&) @ 0x000000000ab4ad88
  7. /build/src/Functions/FunctionsComparison.h:1186: DB::FunctionComparison<DB::EqualsOp, DB::NameEquals>::getReturnTypeImpl(std::vector<std::shared_ptr<DB::IDataType const>, std::allocator<std::shared_ptr<DB::IDataType const>>> const&) const @ 0x000000000d8297b7
  8. /build/src/Functions/IFunction.h:524: DB::IFunction::getReturnTypeImpl(std::vector<DB::ColumnWithTypeAndName, std::allocatorDB::ColumnWithTypeAndName> const&) const @ 0x000000000aa18a8c
  9. /build/src/Functions/IFunctionAdaptors.h:134: DB::FunctionToOverloadResolverAdaptor::getReturnTypeImpl(std::vector<DB::ColumnWithTypeAndName, std::allocatorDB::ColumnWithTypeAndName> const&) const @ 0x000000000aa119f0
  10. /build/src/Functions/IFunction.cpp:489: DB::IFunctionOverloadResolver::getReturnTypeWithoutLowCardinality(std::vector<DB::ColumnWithTypeAndName, std::allocatorDB::ColumnWithTypeAndName> const&) const @ 0x00000000193f1707
  11. /build/src/Functions/IFunction.cpp:435: DB::IFunctionOverloadResolver::getReturnType(std::vector<DB::ColumnWithTypeAndName, std::allocatorDB::ColumnWithTypeAndName> const&) const @ 0x00000000193f1156
  12. /build/src/Functions/IFunction.cpp:450: DB::IFunctionOverloadResolver::build(std::vector<DB::ColumnWithTypeAndName, std::allocatorDB::ColumnWithTypeAndName> const&) const @ 0x00000000193f1761
  13. /build/src/Interpreters/ActionsDAG.cpp:243: DB::ActionsDAG::addFunction(std::shared_ptrDB::IFunctionOverloadResolver const&, std::vector<DB::ActionsDAG::Node const*, std::allocator<DB::ActionsDAG::Node const*>>, String) @ 0x000000001ad008ff
  14. /build/src/Interpreters/ActionsVisitor.cpp:644: DB::ScopeStack::addFunction(std::shared_ptrDB::IFunctionOverloadResolver const&, std::vector<String, std::allocator> const&, String) @ 0x000000001afd44e7
  15. /build/src/Interpreters/ActionsVisitor.h:181: DB::ActionsMatcher::Data::addFunction(std::shared_ptrDB::IFunctionOverloadResolver const&, std::vector<String, std::allocator> const&, String) @ 0x000000001afe0ce1
  16. /build/src/Interpreters/ActionsVisitor.cpp:1318: DB::ActionsMatcher::visit(DB::ASTFunction const&, std::shared_ptrDB::IAST const&, DB::ActionsMatcher::Data&) @ 0x000000001afd9ccf
  17. /build/src/Interpreters/ActionsVisitor.cpp:703: DB::ActionsMatcher::visit(std::shared_ptrDB::IAST const&, DB::ActionsMatcher::Data&) @ 0x000000001afd49b7
  18. /build/src/Interpreters/InDepthNodeVisitor.h:71: DB::InDepthNodeVisitor<DB::ActionsMatcher, true, false, std::shared_ptrDB::IAST const>::doVisit(std::shared_ptrDB::IAST const&) @ 0x000000001afcaca0
  19. /build/src/Interpreters/InDepthNodeVisitor.h:61: void DB::InDepthNodeVisitor<DB::ActionsMatcher, true, false, std::shared_ptrDB::IAST const>::visitImplMain(std::shared_ptrDB::IAST const&) @ 0x000000001afcae81 19. /build/src/Interpreters/InDepthNodeVisitor.h:53: void DB::InDepthNodeVisitor<DB::ActionsMatcher, true, false, std::shared_ptrDB::IAST const>::visitImpl(std::shared_ptrDB::IAST const&) @ 0x000000001afcac2a
  20. /build/src/Interpreters/InDepthNodeVisitor.h:33: DB::InDepthNodeVisitor<DB::ActionsMatcher, true, false, std::shared_ptrDB::IAST const>::visit(std::shared_ptrDB::IAST const&) @ 0x000000001afa9285 21. /build/src/Interpreters/ExpressionAnalyzer.cpp:484: DB::ExpressionAnalyzer::getRootActions(std::shared_ptrDB::IAST const&, bool, std::shared_ptrDB::ActionsDAG&, bool) @ 0x000000001af95c5d 22. /build/src/Interpreters/ExpressionAnalyzer.cpp:1181: DB::SelectQueryExpressionAnalyzer::appendPrewhere(DB::ExpressionActionsChain&, bool) @ 0x000000001af9c957
  21. /build/src/Interpreters/ExpressionAnalyzer.cpp:1917: DB::ExpressionAnalysisResult::ExpressionAnalysisResult(DB::SelectQueryExpressionAnalyzer&, std::shared_ptr<DB::StorageInMemoryMetadata const> const&, bool, bool, bool, std::shared_ptrDB::FilterDAGInfo const&, std::shared_ptrDB::FilterDAGInfo const&, DB::Block const&) @ 0x000000001afa2db4 24. /build/src/Interpreters/InterpreterSelectQuery.cpp:1040: DB::InterpreterSelectQuery::getSampleBlockImpl() @ 0x000000001bf39b24
  22. /build/src/Interpreters/InterpreterSelectQuery.cpp:780: DB::InterpreterSelectQuery::InterpreterSelectQuery(std::shared_ptrDB::IAST const&, std::shared_ptrDB::Context const&, std::optionalDB::Pipe, std::shared_ptrDB::IStorage const&, DB::SelectQueryOptions const&, std::vector<String, std::allocator> const&, std::shared_ptr<DB::StorageInMemoryMetadata const> const&, std::shared_ptrDB::PreparedSets)::$_0::operator()(bool) const @ 0x000000001bf2fbbe
  23. /build/src/Interpreters/InterpreterSelectQuery.cpp:790: DB::InterpreterSelectQuery::InterpreterSelectQuery(std::shared_ptrDB::IAST const&, std::shared_ptrDB::Context const&, std::optionalDB::Pipe, std::shared_ptrDB::IStorage const&, DB::SelectQueryOptions const&, std::vector<String, std::allocator> const&, std::shared_ptr<DB::StorageInMemoryMetadata const> const&, std::shared_ptrDB::PreparedSets) @ 0x000000001bf2ae3b
  24. /build/src/Interpreters/InterpreterSelectQuery.cpp:212: DB::InterpreterSelectQuery::InterpreterSelectQuery(std::shared_ptrDB::IAST const&, std::shared_ptrDB::Context const&, DB::SelectQueryOptions const&, std::vector<String, std::allocator> const&) @ 0x000000001bf266c6
  25. /build/contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:714: std::__unique_ifDB::InterpreterSelectQuery::__unique_single std::make_unique[abi:v15000]<DB::InterpreterSelectQuery, std::shared_ptrDB::IAST const&, std::shared_ptrDB::Context&, DB::SelectQueryOptions&, std::vector<String, std::allocator> const&>(std::shared_ptrDB::IAST const&, std::shared_ptrDB::Context&, DB::SelectQueryOptions&, std::vector<String, std::allocator> const&) @ 0x000000001c0ccdc1 29. /build/src/Interpreters/InterpreterSelectWithUnionQuery.cpp:255: DB::InterpreterSelectWithUnionQuery::buildCurrentChildInterpreter(std::shared_ptrDB::IAST const&, std::vector<String, std::allocator> const&) @ 0x000000001c0ca129
  26. /build/src/Interpreters/InterpreterSelectWithUnionQuery.cpp:153: DB::InterpreterSelectWithUnionQuery::InterpreterSelectWithUnionQuery(std::shared_ptrDB::IAST const&, std::shared_ptrDB::Context, DB::SelectQueryOptions const&, std::vector<String, std::allocator> const&) @ 0x000000001c0c95a5 31. /build/contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:714: std::__unique_ifDB::InterpreterSelectWithUnionQuery::__unique_single std::make_unique[abi:v15000]<DB::InterpreterSelectWithUnionQuery, std::shared_ptrDB::IAST&, std::shared_ptrDB::Context const&, DB::SelectQueryOptions const&>(std::shared_ptrDB::IAST&, std::shared_ptrDB::Context const&, DB::SelectQueryOptions const&) @ 0x000000001c0d0d54
    Fuzzing step 505 out of 1000

SELECT s
FROM buffer_table1__fuzz_2
PREWHERE x = materialize(1)

@wudanzy
Copy link
Contributor Author

wudanzy commented Mar 12, 2024

I can't reproduce the bug by the following:

CREATE TABLE merge_tree_table1 (`s` LowCardinality(String), x UInt32) ENGINE = MergeTree ORDER BY x settings index_granularity = 1;
CREATE TABLE buffer_table1 ( `s` String , x UInt32) ENGINE = Buffer(currentDatabase(), 'merge_tree_table1', 16, 10, 60, 10, 1000, 1048576, 2097152);
insert into merge_tree_table1 values ('a', 1);
SELECT s FROM buffer_table1 PREWHERE x = materialize(1);

Hi Alexey, any insights?

@wudanzy
Copy link
Contributor Author

wudanzy commented Mar 16, 2024

Hello, shall we merge this by hand? This PR is very trivial.

@alexey-milovidov alexey-milovidov merged commit caf0da3 into ClickHouse:master Mar 16, 2024
126 of 129 checks passed
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Mar 16, 2024
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-not-for-changelog This PR should not be mentioned in the changelog 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.

None yet

5 participants