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 restore from backup for definers #64595

Merged
merged 10 commits into from
Jun 17, 2024
Merged

Fix restore from backup for definers #64595

merged 10 commits into from
Jun 17, 2024

Conversation

pufit
Copy link
Member

@pufit pufit commented May 29, 2024

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):

Fix the crash loop when restoring from backup is blocked by creating an MV with a definer that hasn't been restored yet.

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

NOTE: If your merge the PR with modified CI you MUST KNOW what you are doing
NOTE: Checked options will be applied if set before CI RunConfig/PrepareRunConfig step

  • Allow: Integration Tests
  • Allow: Stateless tests
  • Allow: Stateful tests
  • Allow: Unit tests
  • Allow: Performance tests
  • Allow: All with aarch64
  • Allow: All with ASAN
  • Allow: All with TSAN
  • Allow: All with Analyzer
  • Allow: All with Azure
  • Allow: Add your option here

  • Exclude: Fast test
  • Exclude: Integration Tests
  • Exclude: Stateless tests
  • Exclude: Stateful tests
  • Exclude: Performance tests
  • Exclude: All with ASAN
  • Exclude: All with TSAN
  • Exclude: All with MSAN
  • Exclude: All with UBSAN
  • Exclude: All with Coverage
  • Exclude: All with Aarch64

  • do not test (only style check)
  • disable merge-commit (no merge from master before tests)
  • disable CI cache (job reuse)
  • allow: batch 1 for multi-batch jobs
  • allow: batch 2
  • allow: batch 3
  • allow: batch 4, 5 and 6

@robot-clickhouse robot-clickhouse added the pr-bugfix Pull request with bugfix, not backported by default label May 29, 2024
@robot-clickhouse
Copy link
Member

robot-clickhouse commented May 29, 2024

This is an automated comment for commit 74a9d55 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
A SyncIf 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❌ failure
Mergeable CheckChecks if all other necessary checks are successful❌ failure
Stateless testsRuns stateless functional tests for ClickHouse binaries built in various configurations -- release, debug, with sanitizers, etc❌ failure
Successful checks
Check nameDescriptionStatus
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
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
Integration testsThe integration tests report. In parenthesis the package type is given, and in square brackets are the optional part/total tests✅ success
PR CheckChecks correctness of the PR's body✅ success
Stateful testsRuns stateful functional tests for ClickHouse binaries built in various configurations -- release, debug, with sanitizers, etc✅ 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

@vitlibar vitlibar self-assigned this May 29, 2024
@pufit pufit enabled auto-merge May 31, 2024 17:00
@pufit pufit disabled auto-merge May 31, 2024 17:00
@@ -1086,7 +1086,7 @@ BlockIO InterpreterCreateQuery::createTable(ASTCreateQuery & create)
create.sql_security = std::make_shared<ASTSQLSecurity>();

if (create.sql_security)
processSQLSecurityOption(getContext(), create.sql_security->as<ASTSQLSecurity &>(), create.attach, create.is_materialized_view);
processSQLSecurityOption(getContext(), create.sql_security->as<ASTSQLSecurity &>(), create.is_materialized_view, /* skip_check_permissions= */ is_restore_from_backup || create.attach);
Copy link
Member

Choose a reason for hiding this comment

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

Please use LoadingStrictnessLevel instead of create.attach, so it will work correctly for distributed DDL. Also, we can get rid of is_restore_from_backup and replace it with SECONDARY_CREATE

@tavplubix tavplubix self-assigned this Jun 3, 2024
@tavplubix
Copy link
Member

Also, just re-running CI doesn't make any sense, especially when you ignore real bugs found by the CI:

2024-05-31 12:30:57 Thread 1230 "TCPHandler" received signal SIGSEGV, Segmentation fault.
2024-05-31 12:30:57 [Switching to Thread 0x7f38376c6640 (LWP 25236)]
2024-05-31 12:30:57 0x0000559e6875a47a in _Z11typeid_castIPN2DB11ASTFunctionENS0_4IASTEQsr3stdE12is_pointer_vIT_EES4_PT0_ (from=0x0) at ./src/Common/typeid_cast.h:42
2024-05-31 12:30:57 #0  0x0000559e6875a47a in _Z11typeid_castIPN2DB11ASTFunctionENS0_4IASTEQsr3stdE12is_pointer_vIT_EES4_PT0_ (from=0x0) at ./src/Common/typeid_cast.h:42
2024-05-31 12:30:57 No locals.
2024-05-31 12:30:57 #1  DB::TypePromotion<DB::IAST>::CastHelper<DB::ASTFunction, false, false>::value (ptr=0x0, this=<optimized out>) at ./src/Common/TypePromotion.h:38
2024-05-31 12:30:57 No locals.
2024-05-31 12:30:57 #2  DB::TypePromotion<DB::IAST>::as<DB::ASTFunction> (this=0x0) at ./src/Common/TypePromotion.h:52
2024-05-31 12:30:57 No locals.
2024-05-31 12:30:57 #3  DB::TableFunctionFactory::get (this=<optimized out>, ast_function=..., context=...) at ./build_docker/./src/TableFunctions/TableFunctionFactory.cpp:38
2024-05-31 12:31:00         res = {__ptr_ = 0x559e68e73542 <DB::ContextAccess::getAccessRightsWithImplicit() const+290>, __cntrl_ = 0xd0}
2024-05-31 12:31:00         table_function = <optimized out>
2024-05-31 12:31:00 #4  0x0000559e677d11d9 in DB::(anonymous namespace)::TableFunctionLoop::executeImpl (this=<optimized out>, context=..., table_name=..., cached_columns=..., is_insert_query=<optimized out>) at ./build_docker/./src/TableFunctions/TableFunctionLoop.cpp:125
2024-05-31 12:31:00         inner_table_function = <optimized out>
2024-05-31 12:31:00         storage = {__ptr_ = 0x0, __cntrl_ = 0x0}
2024-05-31 12:31:00         res = <optimized out>
2024-05-31 12:31:00 #5  0x0000559e6874e76a in DB::ITableFunction::execute (this=<optimized out>, ast_function=..., context=..., table_name=..., cached_columns=..., use_global_context=<optimized out>, is_insert_query=false) at ./build_docker/./src/TableFunctions/ITableFunction.cpp:37
2024-05-31 12:31:02         required_access = <optimized out>
2024-05-31 12:31:02         context_to_use = {__ptr_ = 0x527003031900, __cntrl_ = 0x5030006b6620}
2024-05-31 12:31:02         this_table_function = {__ptr_ = 0xfe706cec2df, __cntrl_ = 0x7f38367616d8}
2024-05-31 12:31:02         get_storage = <optimized out>
2024-05-31 12:31:02         table_function_properties = <optimized out>
2024-05-31 12:31:02 #6  0x0000559e6a3171b2 in DB::Context::executeTableFunction (this=<optimized out>, table_expression=..., table_function_ptr=...) at ./build_docker/./src/Interpreters/Context.cpp:2059
2024-05-31 12:31:02         hash = {low64 = 5603587427579832120, high64 = 3707251076941320566}
2024-05-31 12:31:02         res = @0x50700346fc78: {__ptr_ = 0x0, __cntrl_ = 0x0}
2024-05-31 12:31:02         key = <optimized out>
2024-05-31 12:31:02 #7  0x0000559e6b6e9eee in DB::QueryAnalyzer::resolveTableFunction (this=<optimized out>, table_function_node=..., scope=..., expressions_visitor=..., nested_table_function=<optimized out>) at ./build_docker/./src/Analyzer/Resolve/QueryAnalyzer.cpp:6229
2024-05-31 12:31:03         table_function_ptr = {__ptr_ = 0x50b001233b98, __cntrl_ = 0x50b001233b80}
2024-05-31 12:31:03         result_table_function_arguments = {__begin_ = 0x0, __end_ = 0x0, __end_cap_ = {<std::__1::__compressed_pair_elem<std::__1::shared_ptr<DB::IQueryTreeNode>*, 0, false>> = {__value_ = 0x0}, <std::__1::__compressed_pair_elem<std::__1::allocator<std::__1::shared_ptr<DB::IQueryTreeNode> >, 1, true>> = {<std::__1::allocator<std::__1::shared_ptr<DB::IQueryTreeNode> >> = {<std::__1::__non_trivial_if<true, std::__1::allocator<std::__1::shared_ptr<DB::IQueryTreeNode> > >> = {<No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}}
2024-05-31 12:31:03         skip_analysis_arguments_indexes = <optimized out>
2024-05-31 12:31:03         table_function_ast = {__ptr_ = 0x513003ace658, __cntrl_ = 0x513003ace640}
2024-05-31 12:31:03         table_function_storage = {__ptr_ = 0x51100269e580, __cntrl_ = 0x559e4dab519f <__sanitizer::RunMallocHooks(void*, unsigned long)+15>}
2024-05-31 12:31:03         table_function_node_typed = @0x51500358b120: {<DB::IQueryTreeNode> = {<DB::TypePromotion<DB::IQueryTreeNode>> = {<No data fields>}, _vptr$IQueryTreeNode = 0x559e7bd8d9d0 <vtable for DB::TableFunctionNode+16>, children = {__begin_ = 0x50200064ccf0, __end_ = 0x50200064cd00, __end_cap_ = {<std::__1::__compressed_pair_elem<std::__1::shared_ptr<DB::IQueryTreeNode>*, 0, false>> = {__value_ = 0x50200064cd00}, <std::__1::__compressed_pair_elem<std::__1::allocator<std::__1::shared_ptr<DB::IQueryTreeNode> >, 1, true>> = {<std::__1::allocator<std::__1::shared_ptr<DB::IQueryTreeNode> >> = {<std::__1::__non_trivial_if<true, std::__1::allocator<std::__1::shared_ptr<DB::IQueryTreeNode> > >> = {<No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}}, weak_pointers = {__begin_ = 0x0, __end_ = 0x0, __end_cap_ = {<std::__1::__compressed_pair_elem<std::__1::weak_ptr<DB::IQueryTreeNode>*, 0, false>> = {__value_ = 0x0}, <std::__1::__compressed_pair_elem<std::__1::allocator<std::__1::weak_ptr<DB::IQueryTreeNode> >, 1, true>> = {<std::__1::allocator<std::__1::weak_ptr<DB::IQueryTreeNode> >> = {<std::__1::__non_trivial_if<true, std::__1::allocator<std::__1::weak_ptr<DB::IQueryTreeNode> > >> = {<No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}}, alias = {static __endian_factor = 1, __r_ = {<std::__1::__compressed_pair_elem<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__rep, 0, false>> = {__value_ = {{__l = {__data_ = 0x0, __size_ = 0, __cap_ = 0, __is_long_ = 0}, __s = {__data_ = '\000' <repeats 22 times>, __padding_ = 0x51500358b16f "", __size_ = 0 '\000', __is_long_ = 0 '\000'}, __r = {__words = {0, 0, 0}}}}}, <std::__1::__compressed_pair_elem<std::__1::allocator<char>, 1, true>> = {<std::__1::allocator<char>> = {<std::__1::__non_trivial_if<true, std::__1::allocator<char> >> = {<No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, static npos = 18446744073709551615}, original_alias = {static __endian_factor = 1, __r_ = {<std::__1::__compressed_pair_elem<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__rep, 0, false>> = {__value_ = {{__l = {__data_ = 0x0, __size_ = 0, __cap_ = 0, __is_long_ = 0}, __s = {__data_ = '\000' <repeats 22 times>, __padding_ = 0x51500358b187 "", __size_ = 0 '\000', __is_long_ = 0 '\000'}, __r = {__words = {0, 0, 0}}}}}, <std::__1::__compressed_pair_elem<std::__1::allocator<char>, 1, true>> = {<std::__1::allocator<char>> = {<std::__1::__non_trivial_if<true, std::__1::allocator<char> >> = {<No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, static npos = 18446744073709551615}, original_ast = {__ptr_ = 0x5130012cd818, __cntrl_ = 0x5130012cd800}}, table_function_name = {static __endian_factor = 1, __r_ = {<std::__1::__compressed_pair_elem<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__rep, 0, false>> = {__value_ = {{__l = {__data_ = 0x706f6f6c <error: Cannot access memory at address 0x706f6f6c>, __size_ = 0, __cap_ = 288230376151711744, __is_long_ = 0}, __s = {__data_ = "loop", '\000' <repeats 18 times>, __padding_ = 0x51500358b1af "\004", __size_ = 4 '\004', __is_long_ = 0 '\000'}, __r = {__words = {1886351212, 0, 288230376151711744}}}}}, <std::__1::__compressed_pair_elem<std::__1::allocator<char>, 1, true>> = {<std::__1::allocator<char>> = {<std::__1::__non_trivial_if<true, std::__1::allocator<char> >> = {<No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, static npos = 18446744073709551615}, table_function = {__ptr_ = 0x0, __cntrl_ = 0x0}, storage = {__ptr_ = 0x0, __cntrl_ = 0x0}, storage_id = {database_name = {static __endian_factor = 1, __r_ = {<std::__1::__compressed_pair_elem<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__rep, 0, false>> = {__value_ = {{__l = {__data_ = 0x6d6574737973 <error: Cannot access memory at address 0x6d6574737973>, __size_ = 0, __cap_ = 432345564227567616, __is_long_ = 0}, __s = {__data_ = "system", '\000' <repeats 16 times>, __padding_ = 0x51500358b1e7 "\006one", __size_ = 6 '\006', __is_long_ = 0 '\000'}, __r = {__words = {120282512849267, 0, 432345564227567616}}}}}, <std::__1::__compressed_pair_elem<std::__1::allocator<char>, 1, true>> = {<std::__1::allocator<char>> = {<std::__1::__non_trivial_if<true, std::__1::allocator<char> >> = {<No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, static npos = 18446744073709551615}, table_name = {static __endian_factor = 1, __r_ = {<std::__1::__compressed_pair_elem<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__rep, 0, false>> = {__value_ = {{__l = {__data_ = 0x656e6f <error: Cannot access memory at address 0x656e6f>, __size_ = 0, __cap_ = 216172782113783808, __is_long_ = 0}, __s = {__data_ = "one", '\000' <repeats 19 times>, __padding_ = 0x51500358b1ff "\003", __size_ = 3 '\003', __is_long_ = 0 '\000'}, __r = {__words = {6647407, 0, 216172782113783808}}}}}, <std::__1::__compressed_pair_elem<std::__1::allocator<char>, 1, true>> = {<std::__1::allocator<char>> = {<std::__1::__non_trivial_if<true, std::__1::allocator<char> >> = {<No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, static npos = 18446744073709551615}, uuid = {t = {items = {0, 0}}}}, storage_snapshot = {__ptr_ = 0x0, __cntrl_ = 0x0}, unresolved_arguments_indexes = {__begin_ = 0x0, __end_ = 0x0, __end_cap_ = {<std::__1::__compressed_pair_elem<unsigned long*, 0, false>> = {__value_ = 0x0}, <std::__1::__compressed_pair_elem<std::__1::allocator<unsigned long>, 1, true>> = {<std::__1::allocator<unsigned long>> = {<std::__1::__non_trivial_if<true, std::__1::allocator<unsigned long> >> = {<No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}}, table_expression_modifiers = {<std::__1::__optional_move_assign_base<DB::TableExpressionModifiers, true>> = {<std::__1::__optional_copy_assign_base<DB::TableExpressionModifiers, true>> = {<std::__1::__optional_move_base<DB::TableExpressionModifiers, true>> = {<std::__1::__optional_copy_base<DB::TableExpressionModifiers, true>> = {<std::__1::__optional_storage_base<DB::TableExpressionModifiers, false>> = {<std::__1::__optional_destruct_base<DB::TableExpressionModifiers, true>> = {{__null_state_ = 0 '\000', __val_ = {has_final = false, sample_size_ratio = {<std::__1::__optional_move_assign_base<DB::ASTSampleRatio::Rational, true>> = {<std::__1::__optional_copy_assign_base<DB::ASTSampleRatio::Rational, true>> = {<std::__1::__optional_move_base<DB::ASTSampleRatio::Rational, true>> = {<std::__1::__optional_copy_base<DB::ASTSampleRatio::Rational, true>> = {<std::__1::__optional_storage_base<DB::ASTSampleRatio::Rational, false>> = {<std::__1::__optional_destruct_base<DB::ASTSampleRatio::Rational, true>> = {{__null_state_ = -66 '\276', __val_ = {...}}, __engaged_ = 190}, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, <std::__1::__sfinae_ctor_base<true, true>> = {<No data fields>}, <std::__1::__sfinae_assign_base<true, true>> = {<No data fields>}, <No data fields>}, sample_offset_ratio = {<std::__1::__optional_move_assign_base<DB::ASTSampleRatio::Rational, true>> = {<std::__1::__optional_copy_assign_base<DB::ASTSampleRatio::Rational, true>> = {<std::__1::__optional_move_base<DB::ASTSampleRatio::Rational, true>> = {<std::__1::__optional_copy_base<DB::ASTSampleRatio::Rational, true>> = {<std::__1::__optional_storage_base<DB::ASTSampleRatio::Rational, false>> = {<std::__1::__optional_destruct_base<DB::ASTSampleRatio::Rational, true>> = {{__null_state_ = -66 '\276', __val_ = {...}}, __engaged_ = 190}, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, <std::__1::__sfinae_ctor_base<true, true>> = {<No data fields>}, <std::__1::__sfinae_assign_base<true, true>> = {<No data fields>}, <No data fields>}}}, __engaged_ = false}, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, <std::__1::__sfinae_ctor_base<true, true>> = {<No data fields>}, <std::__1::__sfinae_assign_base<true, true>> = {<No data fields>}, <No data fields>}, settings_changes = {<std::__1::vector<DB::SettingChange, std::__1::allocator<DB::SettingChange> >> = {__begin_ = 0x0, __end_ = 0x0, __end_cap_ = {<std::__1::__compressed_pair_elem<DB::SettingChange*, 0, false>> = {__value_ = 0x0}, <std::__1::__compressed_pair_elem<std::__1::allocator<DB::SettingChange>, 1, true>> = {<std::__1::allocator<DB::SettingChange>> = {<std::__1::__non_trivial_if<true, std::__1::allocator<DB::SettingChange> >> = {<No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}}, <No data fields>}, static arguments_child_index = 0, static children_size = 1}
2024-05-31 12:31:03         table_function_name = <optimized out>
2024-05-31 12:31:03         scope_context = @0x7f38368c7838: {__ptr_ = 0x527003149900, __cntrl_ = 0x503000b1a5a0}
2024-05-31 12:31:03         table_function_arguments = <optimized out>
2024-05-31 12:31:03         table_function_arguments_size = <optimized out>
2024-05-31 12:31:03         use_structure_from_insertion_table_in_table_functions = <optimized out>
2024-05-31 12:31:03 #8  0x0000559e6b752ad4 in DB::QueryAnalyzer::resolveQueryJoinTreeNode (this=<optimized out>, join_tree_node=..., scope=..., expressions_visitor=...) at ./build_docker/./src/Analyzer/Resolve/QueryAnalyzer.cpp:6570
2024-05-31 12:31:03         from_node_type = <optimized out>
2024-05-31 12:31:03         join_tree_node_type = <optimized out>
2024-05-31 12:31:03         add_table_expression_alias_into_scope = <optimized out>
2024-05-31 12:31:03 #9  0x0000559e6b6d48de in DB::QueryAnalyzer::resolveQuery (this=<optimized out>, query_node=..., scope=...) at ./build_docker/./src/Analyzer/Resolve/QueryAnalyzer.cpp:6820
2024-05-31 12:31:04         table_expressions_visitor = {<DB::InDepthQueryTreeVisitor<DB::TableExpressionsAliasVisitor, false>> = {<No data fields>}, scope = @0x7f38368c7820}
2024-05-31 12:31:04         max_subquery_depth = 100
2024-05-31 12:31:04         visitor = {<DB::InDepthQueryTreeVisitor<DB::QueryExpressionsAliasVisitor, false>> = {<No data fields>}, aliases = @0x7f38368c7898}
2024-05-31 12:31:04         projection_columns = {__begin_ = 0x559e6c920cfb <DB::executeQueryImpl(char const*, char const*, std::__1::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum, DB::ReadBuffer*)+21755>, __end_ = 0xa2200bf4520, __end_cap_ = {<std::__1::__compressed_pair_elem<DB::NameAndTypePair*, 0, false>> = {__value_ = 0xa24003d9912}, <std::__1::__compressed_pair_elem<std::__1::allocator<DB::NameAndTypePair>, 1, true>> = {<std::__1::allocator<DB::NameAndTypePair>> = {<std::__1::__non_trivial_if<true, std::__1::allocator<DB::NameAndTypePair> >> = {<No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}}
2024-05-31 12:31:04         query_node_typed = @0x5110025e0098: {<DB::IQueryTreeNode> = {<DB::TypePromotion<DB::IQueryTreeNode>> = {<No data fields>}, _vptr$IQueryTreeNode = 0x559e7bd8d730 <vtable for DB::QueryNode+16>, children = {__begin_ = 0x51100318e580, __end_ = 0x51100318e680, __end_cap_ = {<std::__1::__compressed_pair_elem<std::__1::shared_ptr<DB::IQueryTreeNode>*, 0, false>> = {__value_ = 0x51100318e680}, <std::__1::__compressed_pair_elem<std::__1::allocator<std::__1::shared_ptr<DB::IQueryTreeNode> >, 1, true>> = {<std::__1::allocator<std::__1::shared_ptr<DB::IQueryTreeNode> >> = {<std::__1::__non_trivial_if<true, std::__1::allocator<std::__1::shared_ptr<DB::IQueryTreeNode> > >> = {<No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}}, weak_pointers = {__begin_ = 0x0, __end_ = 0x0, __end_cap_ = {<std::__1::__compressed_pair_elem<std::__1::weak_ptr<DB::IQueryTreeNode>*, 0, false>> = {__value_ = 0x0}, <std::__1::__compressed_pair_elem<std::__1::allocator<std::__1::weak_ptr<DB::IQueryTreeNode> >, 1, true>> = {<std::__1::allocator<std::__1::weak_ptr<DB::IQueryTreeNode> >> = {<std::__1::__non_trivial_if<true, std::__1::allocator<std::__1::weak_ptr<DB::IQueryTreeNode> > >> = {<No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}}, alias = {static __endian_factor = 1, __r_ = {<std::__1::__compressed_pair_elem<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__rep, 0, false>> = {__value_ = {{__l = {__data_ = 0x0, __size_ = 0, __cap_ = 0, __is_long_ = 0}, __s = {__data_ = '\000' <repeats 22 times>, __padding_ = 0x5110025e00e7 "", __size_ = 0 '\000', __is_long_ = 0 '\000'}, __r = {__words = {0, 0, 0}}}}}, <std::__1::__compressed_pair_elem<std::__1::allocator<char>, 1, true>> = {<std::__1::allocator<char>> = {<std::__1::__non_trivial_if<true, std::__1::allocator<char> >> = {<No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, static npos = 18446744073709551615}, original_alias = {static __endian_factor = 1, __r_ = {<std::__1::__compressed_pair_elem<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__rep, 0, false>> = {__value_ = {{__l = {__data_ = 0x0, __size_ = 0, __cap_ = 0, __is_long_ = 0}, __s = {__data_ = '\000' <repeats 22 times>, __padding_ = 0x5110025e00ff "", __size_ = 0 '\000', __is_long_ = 0 '\000'}, __r = {__words = {0, 0, 0}}}}}, <std::__1::__compressed_pair_elem<std::__1::allocator<char>, 1, true>> = {<std::__1::allocator<char>> = {<std::__1::__non_trivial_if<true, std::__1::allocator<char> >> = {<No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, static npos = 18446744073709551615}, original_ast = {__ptr_ = 0x511005fa2858, __cntrl_ = 0x511005fa2840}}, is_subquery = false, is_cte = false, is_recursive_with = false, is_distinct = false, is_limit_with_ties = false, is_group_by_with_totals = false, is_group_by_with_rollup = false, is_group_by_with_cube = false, is_group_by_with_grouping_sets = false, is_group_by_all = false, is_order_by_all = false, cte_name = {static __endian_factor = 1, __r_ = {<std::__1::__compressed_pair_elem<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__rep, 0, false>> = {__value_ = {{__l = {__data_ = 0x0, __size_ = 0, __cap_ = 0, __is_long_ = 0}, __s = {__data_ = '\000' <repeats 22 times>, __padding_ = 0x5110025e0137 "", __size_ = 0 '\000', __is_long_ = 0 '\000'}, __r = {__words = {0, 0, 0}}}}}, <std::__1::__compressed_pair_elem<std::__1::allocator<char>, 1, true>> = {<std::__1::allocator<char>> = {<std::__1::__non_trivial_if<true, std::__1::allocator<char> >> = {<No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, static npos = 18446744073709551615}, projection_columns = {__begin_ = 0x0, __end_ = 0x0, __end_cap_ = {<std::__1::__compressed_pair_elem<DB::NameAndTypePair*, 0, false>> = {__value_ = 0x0}, <std::__1::__compressed_pair_elem<std::__1::allocator<DB::NameAndTypePair>, 1, true>> = {<std::__1::allocator<DB::NameAndTypePair>> = {<std::__1::__non_trivial_if<true, std::__1::allocator<DB::NameAndTypePair> >> = {<No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}}, context = {__ptr_ = 0x527003149900, __cntrl_ = 0x503000b1a5a0}, settings_changes = {<std::__1::vector<DB::SettingChange, std::__1::allocator<DB::SettingChange> >> = {__begin_ = 0x0, __end_ = 0x0, __end_cap_ = {<std::__1::__compressed_pair_elem<DB::SettingChange*, 0, false>> = {__value_ = 0x0}, <std::__1::__compressed_pair_elem<std::__1::allocator<DB::SettingChange>, 1, true>> = {<std::__1::allocator<DB::SettingChange>> = {<std::__1::__non_trivial_if<true, std::__1::allocator<DB::SettingChange> >> = {<No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}}, <No data fields>}, static with_child_index = 0, static projection_child_index = 1, static join_tree_child_index = 2, static prewhere_child_index = 3, static where_child_index = 4, static group_by_child_index = 5, static having_child_index = 6, static window_child_index = 7, static qualify_child_index = 8, static order_by_child_index = 9, static interpolate_child_index = 10, static limit_by_limit_child_index = 11, static limit_by_offset_child_index = 12, static limit_by_child_index = 13, static limit_child_index = 14, static offset_child_index = 15, static children_size = 16}
2024-05-31 12:31:04         is_rollup_or_cube = <optimized out>
2024-05-31 12:31:04         with_nodes = <optimized out>
2024-05-31 12:31:04 #10 0x0000559e6b6d2db3 in DB::QueryAnalyzer::resolve (this=<optimized out>, node=..., table_expression=..., context=...) at ./build_docker/./src/Analyzer/Resolve/QueryAnalyzer.cpp:128
2024-05-31 12:31:04         scope = <optimized out>
2024-05-31 12:31:04         node_type = <optimized out>
2024-05-31 12:31:04 #11 0x0000559e6b6d1802 in DB::QueryAnalysisPass::run (this=<optimized out>, query_tree_node=..., context=...) at ./build_docker/./src/Analyzer/Resolve/QueryAnalysisPass.cpp:18
2024-05-31 12:31:04         analyzer = <optimized out>
2024-05-31 12:31:04 #12 0x0000559e6b6ca26c in DB::QueryTreePassManager::run (this=<optimized out>, query_tree_node=...) at ./build_docker/./src/Analyzer/QueryTreePassManager.cpp:185
2024-05-31 12:31:04         i = <optimized out>
2024-05-31 12:31:04         current_context = {__ptr_ = 0x527001275100, __cntrl_ = 0x503000a76ad0}
2024-05-31 12:31:04         passes_size = <optimized out>
2024-05-31 12:31:04 #13 0x0000559e6c02f1e7 in DB::(anonymous namespace)::buildQueryTreeAndRunPasses (query=..., select_query_options=..., context=..., storage=...) at ./build_docker/./src/Interpreters/InterpreterSelectQueryAnalyzer.cpp:142
2024-05-31 12:31:04         query_tree = {__ptr_ = 0x5110025e0098, __cntrl_ = 0x5110025e0080}
2024-05-31 12:31:04         query_tree_pass_manager = <optimized out>
2024-05-31 12:31:04 #14 0x0000559e6c02990f in DB::InterpreterSelectQueryAnalyzer::InterpreterSelectQueryAnalyzer (this=0x5130029db600, query_=..., context_=..., select_query_options_=..., column_names=...) at ./build_docker/./src/Interpreters/InterpreterSelectQueryAnalyzer.cpp:160
2024-05-31 12:31:04 No locals.
2024-05-31 12:31:04 #15 0x0000559e6c0320a9 in std::__1::make_unique[abi:v15000]<DB::InterpreterSelectQueryAnalyzer, std::__1::shared_ptr<DB::IAST>&, std::__1::shared_ptr<DB::Context> const&, DB::SelectQueryOptions const&>(std::__1::shared_ptr<DB::IAST>&, std::__1::shared_ptr<DB::Context> const&, DB::SelectQueryOptions const&) (__args=..., __args=..., __args=...) at ./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:714
2024-05-31 12:31:04 No locals.
2024-05-31 12:31:04 #16 0x0000559e6bf37c5b in std::__1::__function::__policy_func<std::__1::unique_ptr<DB::IInterpreter, std::__1::default_delete<DB::IInterpreter> > (DB::InterpreterFactory::Arguments const&)>::operator()[abi:v15000](DB::InterpreterFactory::Arguments const&) const (this=0x7f383675e350, __args=...) at ./contrib/llvm-project/libcxx/include/__functional/function.h:848
2024-05-31 12:31:04 No locals.
2024-05-31 12:31:04 #17 std::__1::function<std::__1::unique_ptr<DB::IInterpreter, std::__1::default_delete<DB::IInterpreter> > (DB::InterpreterFactory::Arguments const&)>::operator()(DB::InterpreterFactory::Arguments const&) const (this=0x7f383675e350, __arg=...) at ./contrib/llvm-project/libcxx/include/__functional/function.h:1187
2024-05-31 12:31:04 No locals.
2024-05-31 12:31:04 #18 DB::InterpreterFactory::get (this=<optimized out>, query=..., context=..., options=...) at ./build_docker/./src/Interpreters/InterpreterFactory.cpp:355
2024-05-31 12:31:04         arguments = {query = @0x7f3836cdf440, context = {__ptr_ = 0x0, __cntrl_ = 0x0}, options = @0x0, allow_materialized = false}
2024-05-31 12:31:04         interpreter_name = <optimized out>
2024-05-31 12:31:04         creator_fn = <optimized out>
2024-05-31 12:31:04 #19 0x0000559e6c920cfb in DB::executeQueryImpl (begin=<optimized out>, end=<optimized out>, context=..., flags=..., stage=<optimized out>, istr=<optimized out>) at ./build_docker/./src/Interpreters/executeQuery.cpp:1146

@pufit
Copy link
Member Author

pufit commented Jun 3, 2024

Also, just re-running CI doesn't make any sense, especially when you ignore real bugs found by the CI:

This bug isn't related to the PR, so I restarted the CI several times just to be sure.
Anyway, the bug is already fixed #64716

@tavplubix
Copy link
Member

This bug isn't related to the PR, so I restarted the CI several times just to be sure.

Unrelated bugs are still worth attention. What's the point of running the CI if we ignore bugs that it finds? If you want to be sure, then please try to investigate the failures: you will see if they are related or not. You cannot be sure by just re-running the CI, because checks may be flaky, and re-run may hide a real bug if it's not 100% reproducible.

@pufit
Copy link
Member Author

pufit commented Jun 5, 2024

The broken test is flaky and unrelated
https://pastila.nl/?01644067/e1d3353bea35f0a2e3f574510c302df4.link

@pufit pufit enabled auto-merge June 15, 2024 04:20
Merged via the queue into master with commit 9cb38f9 Jun 17, 2024
83 of 87 checks passed
@pufit pufit deleted the pufit/fix-definers-restore branch June 17, 2024 03:24
@robot-ch-test-poll robot-ch-test-poll added the pr-synced-to-cloud The PR is synced to the cloud repo label Jun 17, 2024
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Jun 17, 2024
robot-ch-test-poll1 added a commit that referenced this pull request Jun 17, 2024
Backport #64595 to 24.5: Fix restore from backup for definers
robot-clickhouse added a commit that referenced this pull request Jun 17, 2024
Backport #64595 to 24.4: Fix restore from backup for definers
pufit pushed a commit that referenced this pull request Jun 17, 2024
Enmk pushed a commit to Altinity/ClickHouse that referenced this pull request Jul 4, 2024
…s-restore

Fix restore from backup for definers
Enmk added a commit to Altinity/ClickHouse that referenced this pull request Jul 6, 2024
…ners_restore_from_backup

24.3 Backport of ClickHouse#64595 - fix definers restore from backup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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-cloud pr-synced-to-cloud The PR is synced to the cloud repo v24.3-must-backport
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants