From 319f6096d8533516517e8e1653ffe25afcf213c8 Mon Sep 17 00:00:00 2001 From: lidezhu Date: Wed, 31 Aug 2022 11:23:36 +0800 Subject: [PATCH 1/8] bump grpc to 1.44.0 --- contrib/grpc | 2 +- contrib/protobuf | 2 +- contrib/protobuf-cmake/CMakeLists.txt | 10 ++++++++-- dbms/src/Server/MockComputeClient.h | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/contrib/grpc b/contrib/grpc index de893acb6ae..591d56e1300 160000 --- a/contrib/grpc +++ b/contrib/grpc @@ -1 +1 @@ -Subproject commit de893acb6aef88484a427e64b96727e4926fdcfd +Subproject commit 591d56e1300b6d11948e1b821efac785a295989c diff --git a/contrib/protobuf b/contrib/protobuf index 09745575a92..cb46755e640 160000 --- a/contrib/protobuf +++ b/contrib/protobuf @@ -1 +1 @@ -Subproject commit 09745575a923640154bcf307fba8aedff47f240a +Subproject commit cb46755e6405e083b45481f5ea4754b180705529 diff --git a/contrib/protobuf-cmake/CMakeLists.txt b/contrib/protobuf-cmake/CMakeLists.txt index d81c8bb40b7..b0994a031ee 100644 --- a/contrib/protobuf-cmake/CMakeLists.txt +++ b/contrib/protobuf-cmake/CMakeLists.txt @@ -15,7 +15,10 @@ include_directories( set(libprotobuf_lite_files ${protobuf_source_dir}/src/google/protobuf/any_lite.cc ${protobuf_source_dir}/src/google/protobuf/arena.cc + ${protobuf_source_dir}/src/google/protobuf/arenastring.cc ${protobuf_source_dir}/src/google/protobuf/extension_set.cc + ${protobuf_source_dir}/src/google/protobuf/generated_enum_util.cc + ${protobuf_source_dir}/src/google/protobuf/generated_message_bases.cc ${protobuf_source_dir}/src/google/protobuf/generated_message_table_driven_lite.cc ${protobuf_source_dir}/src/google/protobuf/generated_message_util.cc ${protobuf_source_dir}/src/google/protobuf/implicit_weak_message.cc @@ -23,10 +26,13 @@ set(libprotobuf_lite_files ${protobuf_source_dir}/src/google/protobuf/io/io_win32.cc ${protobuf_source_dir}/src/google/protobuf/io/strtod.cc ${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream.cc + ${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream_impl.cc ${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream_impl_lite.cc + ${protobuf_source_dir}/src/google/protobuf/map.cc ${protobuf_source_dir}/src/google/protobuf/message_lite.cc ${protobuf_source_dir}/src/google/protobuf/parse_context.cc ${protobuf_source_dir}/src/google/protobuf/repeated_field.cc + ${protobuf_source_dir}/src/google/protobuf/repeated_ptr_field.cc ${protobuf_source_dir}/src/google/protobuf/stubs/bytestream.cc ${protobuf_source_dir}/src/google/protobuf/stubs/common.cc ${protobuf_source_dir}/src/google/protobuf/stubs/int128.cc @@ -68,14 +74,12 @@ set(libprotobuf_files ${protobuf_source_dir}/src/google/protobuf/io/gzip_stream.cc ${protobuf_source_dir}/src/google/protobuf/io/printer.cc ${protobuf_source_dir}/src/google/protobuf/io/tokenizer.cc - ${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream_impl.cc ${protobuf_source_dir}/src/google/protobuf/map_field.cc ${protobuf_source_dir}/src/google/protobuf/message.cc ${protobuf_source_dir}/src/google/protobuf/reflection_ops.cc ${protobuf_source_dir}/src/google/protobuf/service.cc ${protobuf_source_dir}/src/google/protobuf/source_context.pb.cc ${protobuf_source_dir}/src/google/protobuf/struct.pb.cc - ${protobuf_source_dir}/src/google/protobuf/stubs/mathlimits.cc ${protobuf_source_dir}/src/google/protobuf/stubs/substitute.cc ${protobuf_source_dir}/src/google/protobuf/text_format.cc ${protobuf_source_dir}/src/google/protobuf/timestamp.pb.cc @@ -133,6 +137,7 @@ set(libprotoc_files ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_message.cc ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_message_field.cc ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_padding_optimizer.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_parse_function_generator.cc ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_service.cc ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_string_field.cc @@ -165,6 +170,7 @@ set(libprotoc_files ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_generator.cc ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_generator_factory.cc ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_helpers.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_kotlin_generator.cc ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_map_field.cc ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_map_field_lite.cc ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message.cc diff --git a/dbms/src/Server/MockComputeClient.h b/dbms/src/Server/MockComputeClient.h index b4b2e05a7fb..51f41911eb7 100644 --- a/dbms/src/Server/MockComputeClient.h +++ b/dbms/src/Server/MockComputeClient.h @@ -18,7 +18,7 @@ #include #include using grpc::Status; -using grpc_impl::Channel; +using grpc::Channel; namespace DB { From 4f9b74a5a73da1ef0ab7877bafe0059b19e31161 Mon Sep 17 00:00:00 2001 From: JaySon-Huang Date: Wed, 31 Aug 2022 14:13:08 +0800 Subject: [PATCH 2/8] Update kvproto Signed-off-by: JaySon-Huang --- contrib/kvproto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/kvproto b/contrib/kvproto index a5d4ffd2ba3..f301582b3a1 160000 --- a/contrib/kvproto +++ b/contrib/kvproto @@ -1 +1 @@ -Subproject commit a5d4ffd2ba337dad0bc99e9fb53bf665864a3f3b +Subproject commit f301582b3a1c9fa06291f859bc522c8ee054182e From 9c05f0d5a19ad16cf8fda4674e355d65716c5b7d Mon Sep 17 00:00:00 2001 From: JaySon-Huang Date: Wed, 31 Aug 2022 15:35:34 +0800 Subject: [PATCH 3/8] Export ABSL_ROOT_DIR Signed-off-by: JaySon-Huang --- contrib/abseil-cpp-cmake/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/abseil-cpp-cmake/CMakeLists.txt b/contrib/abseil-cpp-cmake/CMakeLists.txt index 386b2b64e1e..7cba29ef336 100644 --- a/contrib/abseil-cpp-cmake/CMakeLists.txt +++ b/contrib/abseil-cpp-cmake/CMakeLists.txt @@ -1,4 +1,5 @@ set(ABSL_ROOT_DIR "${TiFlash_SOURCE_DIR}/contrib/abseil-cpp") +set(ABSL_ROOT_DIR "${ABSL_ROOT_DIR}" PARENT_SCOPE) if(NOT EXISTS "${ABSL_ROOT_DIR}/CMakeLists.txt") message(FATAL_ERROR " submodule third_party/abseil-cpp is missing. To fix try run: \n git submodule update --init --recursive") endif() From 7da5245bd6191b0354a43b92834bf8a62cfd32e4 Mon Sep 17 00:00:00 2001 From: lidezhu Date: Wed, 31 Aug 2022 16:12:49 +0800 Subject: [PATCH 4/8] format --- dbms/src/Server/MockComputeClient.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dbms/src/Server/MockComputeClient.h b/dbms/src/Server/MockComputeClient.h index 51f41911eb7..07f99953552 100644 --- a/dbms/src/Server/MockComputeClient.h +++ b/dbms/src/Server/MockComputeClient.h @@ -17,12 +17,11 @@ #include #include #include -using grpc::Status; using grpc::Channel; +using grpc::Status; namespace DB { - /// Send RPC Requests to FlashService /// TODO: Support more methods that FlashService serve. /// TODO: Support more config of RPC client. From 67bfda4995812a3a21484a98fc5e1b1b6f6fc28f Mon Sep 17 00:00:00 2001 From: JaySon-Huang Date: Wed, 31 Aug 2022 18:06:08 +0800 Subject: [PATCH 5/8] Update kvproto for grpc 1.44 Signed-off-by: JaySon-Huang --- contrib/kvproto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/kvproto b/contrib/kvproto index f301582b3a1..1c389f1f254 160000 --- a/contrib/kvproto +++ b/contrib/kvproto @@ -1 +1 @@ -Subproject commit f301582b3a1c9fa06291f859bc522c8ee054182e +Subproject commit 1c389f1f254b262af195b9c2f477bd75f7007a17 From e7487324068519f6331c7aa0073060dab9a51238 Mon Sep 17 00:00:00 2001 From: JaySon-Huang Date: Wed, 31 Aug 2022 18:04:24 +0800 Subject: [PATCH 6/8] Ignore the cache change in contrib Signed-off-by: JaySon-Huang --- format-diff.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/format-diff.py b/format-diff.py index f40863928d1..09cc4c73bd7 100755 --- a/format-diff.py +++ b/format-diff.py @@ -89,10 +89,19 @@ def main(): if args.check_formatted: diff_res = run_cmd('git diff --name-only') - if diff_res: + files_not_in_contrib = [f for f in diff_res if not f.startswith('contrib')] + files_contrib = [f for f in diff_res if f.startswith('contrib')] + if files_not_in_contrib: + print('') print('Error: found files NOT formatted') - print(''.join(diff_res)) + print(''.join(files_not_in_contrib)) exit(-1) + elif files_contrib: + print('') + print('Warn: found contrib changed') + print(''.join(files_contrib)) + print('') + print(''.join(run_cmd('git status'))) else: print("Format check passed") else: From 198b9a550ac984f8363e4151ba0fd57ddd8a373c Mon Sep 17 00:00:00 2001 From: lidezhu Date: Wed, 31 Aug 2022 22:45:06 +0800 Subject: [PATCH 7/8] remove test on deprecated field --- .../Storages/Transaction/tests/gtest_kvstore.cpp | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/dbms/src/Storages/Transaction/tests/gtest_kvstore.cpp b/dbms/src/Storages/Transaction/tests/gtest_kvstore.cpp index 6ba67bd3668..8e5b463ce43 100644 --- a/dbms/src/Storages/Transaction/tests/gtest_kvstore.cpp +++ b/dbms/src/Storages/Transaction/tests/gtest_kvstore.cpp @@ -1494,20 +1494,6 @@ TEST_F(RegionKVStoreTest, Basic) { test_mergeresult(); } - { - raft_cmdpb::AdminResponse response; - response.mutable_split()->mutable_left()->add_peers()->set_id(123); - RegionState region_state; - region_state.getMutRegion().add_peers()->set_id(456); - try - { - CheckRegionForMergeCmd(response, region_state); - } - catch (Exception & e) - { - ASSERT_EQ(e.message(), "CheckRegionForMergeCmd: current region meta: peers { id: 456 }, expect: peers { id: 123 }"); - } - } } } // namespace tests From b7fbf0ae0a4f98d935dd3844fdbaa3a7426ac32c Mon Sep 17 00:00:00 2001 From: lidezhu Date: Thu, 1 Sep 2022 14:04:57 +0800 Subject: [PATCH 8/8] fix unit test build --- dbms/src/TestUtils/mockExecutor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbms/src/TestUtils/mockExecutor.cpp b/dbms/src/TestUtils/mockExecutor.cpp index 4ed72917436..aee6536ea07 100644 --- a/dbms/src/TestUtils/mockExecutor.cpp +++ b/dbms/src/TestUtils/mockExecutor.cpp @@ -106,7 +106,7 @@ std::shared_ptr DAGRequestBuilder::build(MockDAGRequestContext mutable_executor->clear_executor_id(); return true; }); - dag_request_ptr->release_root_executor(); + std::ignore = dag_request_ptr->release_root_executor(); } return dag_request_ptr;