From 145f0702e57ec6740d516b3fa3131b5555ce0128 Mon Sep 17 00:00:00 2001 From: Aleksei Levushkin Date: Fri, 27 Dec 2019 16:33:08 +0300 Subject: [PATCH 001/134] added grpc as submodule --- .gitmodules | 3 +++ contrib/CMakeLists.txt | 2 ++ contrib/grpc | 1 + 3 files changed, 6 insertions(+) create mode 160000 contrib/grpc diff --git a/.gitmodules b/.gitmodules index 0b80743cadb..97c2b27c364 100644 --- a/.gitmodules +++ b/.gitmodules @@ -106,3 +106,6 @@ [submodule "contrib/sparsehash-c11"] path = contrib/sparsehash-c11 url = https://github.com/sparsehash/sparsehash-c11.git +[submodule "contrib/grpc"] + path = contrib/grpc + url = https://github.com/grpc/grpc.git diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt index b0a271b21ac..e434bdb3c07 100644 --- a/contrib/CMakeLists.txt +++ b/contrib/CMakeLists.txt @@ -332,6 +332,8 @@ if (USE_FASTOPS) add_subdirectory (fastops-cmake) endif() +add_subdirectory(grpc-cmake) + #if (USE_INTERNAL_ORC_LIBRARY) # add_subdirectory(orc-cmake) #endif () diff --git a/contrib/grpc b/contrib/grpc new file mode 160000 index 00000000000..c1d176528fd --- /dev/null +++ b/contrib/grpc @@ -0,0 +1 @@ +Subproject commit c1d176528fd8da9dd4066d16554bcd216d29033f From bbd368cdac18742e32830d16c72cc199d841180d Mon Sep 17 00:00:00 2001 From: Aleksei Levushkin Date: Fri, 27 Dec 2019 16:33:42 +0300 Subject: [PATCH 002/134] added grpc-cmake --- contrib/grpc-cmake/CMakeLists.txt | 1482 +++++++++++++++++++++++++++++ 1 file changed, 1482 insertions(+) create mode 100644 contrib/grpc-cmake/CMakeLists.txt diff --git a/contrib/grpc-cmake/CMakeLists.txt b/contrib/grpc-cmake/CMakeLists.txt new file mode 100644 index 00000000000..85f3e6c6737 --- /dev/null +++ b/contrib/grpc-cmake/CMakeLists.txt @@ -0,0 +1,1482 @@ +cmake_minimum_required(VERSION 3.5.1) + +set(GRPC_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../grpc) +set(GRPC_INCLUDE_DIR ${GRPC_SOURCE_DIR}/include/) + +if(UNIX) + if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + set(_gRPC_PLATFORM_LINUX ON) + elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + set(_gRPC_PLATFORM_MAC ON) + else() + set(_gRPC_PLATFORM_POSIX ON) + endif() +endif() + +set(CMAKE_POSITION_INDEPENDENT_CODE TRUE) + +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_gRPC_C_CXX_FLAGS}") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_gRPC_C_CXX_FLAGS}") + +set(_gRPC_PROTOBUF_LIBRARY_NAME "libprotobuf") + +if(gRPC_BACKWARDS_COMPATIBILITY_MODE) + add_definitions(-DGPR_BACKWARDS_COMPATIBILITY_MODE) + if (_gRPC_PLATFORM_MAC) + # some C++11 constructs not supported before OS X 10.9 + set(CMAKE_OSX_DEPLOYMENT_TARGET 10.9) + endif() +endif() + +if (_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC) + set(_gRPC_CORE_NOSTDCXX_FLAGS -fno-exceptions -fno-rtti) +else() + set(_gRPC_CORE_NOSTDCXX_FLAGS "") +endif() + +# address_sorting.cmake +include(${GRPC_SOURCE_DIR}/cmake/address_sorting.cmake) +set(_gRPC_ADDRESS_SORTING_INCLUDE_DIR "${GRPC_SOURCE_DIR}/third_party/address_sorting/include") +set(_gRPC_ADDRESS_SORTING_LIBRARIES address_sorting) + +# cares.cmake +set(CARES_ROOT_DIR ${GRPC_SOURCE_DIR}/third_party/cares/cares) +set(CARES_SHARED OFF CACHE BOOL "disable shared library") +set(CARES_STATIC ON CACHE BOOL "link cares statically") +if(gRPC_BACKWARDS_COMPATIBILITY_MODE) + # See https://github.com/grpc/grpc/issues/17255 + set(HAVE_LIBNSL OFF CACHE BOOL "avoid cares dependency on libnsl") +endif() +add_subdirectory(${CARES_ROOT_DIR} ${CARES_ROOT_DIR}) +if(TARGET c-ares) + set(_gRPC_CARES_LIBRARIES c-ares) +endif() + +# protobuf.cmake +set(PROTOBUF_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../protobuf) +if(NOT protobuf_BUILD_TESTS) + set(protobuf_BUILD_TESTS OFF CACHE BOOL "Build protobuf tests") +endif() +if(NOT protobuf_WITH_ZLIB) + set(protobuf_WITH_ZLIB OFF CACHE BOOL "Build protobuf with zlib.") +endif() +set(protobuf_MSVC_STATIC_RUNTIME OFF CACHE BOOL "Link static runtime libraries") +if(NOT USE_INTERNAL_PROTOBUF_LIBRARY) + add_subdirectory(${PROTOBUF_ROOT_DIR}/cmake ${GRPC_SOURCE_DIR}/third_party/protobuf) +endif() +if(TARGET ${_gRPC_PROTOBUF_LIBRARY_NAME}) + set(_gRPC_PROTOBUF_LIBRARIES ${_gRPC_PROTOBUF_LIBRARY_NAME}) +endif() +if(TARGET libprotoc) + set(_gRPC_PROTOBUF_PROTOC_LIBRARIES libprotoc) +endif() +if(TARGET protoc) + set(_gRPC_PROTOBUF_PROTOC protoc) + set(_gRPC_PROTOBUF_PROTOC_EXECUTABLE $) +endif() +# For well-known .proto files distributed with protobuf +set(_gRPC_PROTOBUF_WELLKNOWN_INCLUDE_DIR "${PROTOBUF_ROOT_DIR}/src") +if(gRPC_INSTALL) + message(WARNING "gRPC_INSTALL will be forced to FALSE because gRPC_PROTOBUF_PROVIDER is \"module\"") + set(gRPC_INSTALL FALSE) +endif() + +# ssl.cmake +set(BORINGSSL_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../ssl) +if(TARGET ssl) + set(_gRPC_SSL_LIBRARIES ssl) + set(_gRPC_SSL_INCLUDE_DIR ${BORINGSSL_ROOT_DIR}/include) +endif() + +# upb.cmake +set(UPB_ROOT_DIR ${GRPC_SOURCE_DIR}/third_party/upb) +set(_gRPC_UPB_INCLUDE_DIR "${UPB_ROOT_DIR}") +set(_gRPC_UPB_GRPC_GENERATED_DIR "${GRPC_SOURCE_DIR}/src/core/ext/upb-generated") +set(_gRPC_UPB_LIBRARIES upb) + +# zlib.cmake +set(ZLIB_ROOT_DIR ${GRPC_SOURCE_DIR}/third_party/zlib) +include_directories("${ZLIB_ROOT_DIR}") +add_subdirectory(${ZLIB_ROOT_DIR} ${ZLIB_ROOT_DIR}) +set(_gRPC_ZLIB_LIBRARIES zlibstatic) +set(_gRPC_ZLIB_INCLUDE_DIR "${ZLIB_ROOT_DIR}") + + +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + +if(_gRPC_PLATFORM_MAC) + set(_gRPC_ALLTARGETS_LIBRARIES ${CMAKE_DL_LIBS} m pthread) +elseif(UNIX) + set(_gRPC_ALLTARGETS_LIBRARIES ${CMAKE_DL_LIBS} rt m pthread) +endif() + +add_library(address_sorting + ${GRPC_SOURCE_DIR}/third_party/address_sorting/address_sorting.c + ${GRPC_SOURCE_DIR}/third_party/address_sorting/address_sorting_posix.c + ${GRPC_SOURCE_DIR}/third_party/address_sorting/address_sorting_windows.c +) + +target_include_directories(address_sorting + PUBLIC $ $ + PRIVATE ${GRPC_SOURCE_DIR} + PRIVATE ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + PRIVATE ${_gRPC_CARES_INCLUDE_DIR} + PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR} + PRIVATE ${_gRPC_SSL_INCLUDE_DIR} + PRIVATE ${_gRPC_UPB_GENERATED_DIR} + PRIVATE ${_gRPC_UPB_GRPC_GENERATED_DIR} + PRIVATE ${_gRPC_UPB_INCLUDE_DIR} + PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} +) +target_link_libraries(address_sorting + ${_gRPC_BASELIB_LIBRARIES} + ${_gRPC_ALLTARGETS_LIBRARIES} +) + +add_library(gpr + ${GRPC_SOURCE_DIR}/src/core/lib/gpr/alloc.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gpr/atm.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gpr/cpu_iphone.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gpr/cpu_linux.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gpr/cpu_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gpr/cpu_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gpr/env_linux.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gpr/env_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gpr/env_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gpr/log.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gpr/log_android.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gpr/log_linux.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gpr/log_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gpr/log_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gpr/murmur_hash.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gpr/string.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gpr/string_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gpr/string_util_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gpr/string_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gpr/sync.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gpr/sync_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gpr/sync_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gpr/time.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gpr/time_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gpr/time_precise.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gpr/time_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gpr/tls_pthread.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gpr/tmpfile_msys.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gpr/tmpfile_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gpr/tmpfile_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gpr/wrap_memcpy.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gprpp/arena.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gprpp/fork.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gprpp/global_config_env.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gprpp/host_port.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gprpp/mpscq.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gprpp/thd_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/gprpp/thd_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/profiling/basic_timers.cc + ${GRPC_SOURCE_DIR}/src/core/lib/profiling/stap_timers.cc +) + +target_include_directories(gpr + PUBLIC ${GRPC_INCLUDE_DIR} + PRIVATE ${GRPC_SOURCE_DIR} + PRIVATE ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + PRIVATE ${_gRPC_CARES_INCLUDE_DIR} + PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR} + PRIVATE ${_gRPC_SSL_INCLUDE_DIR} + PRIVATE ${_gRPC_UPB_GENERATED_DIR} + PRIVATE ${_gRPC_UPB_GRPC_GENERATED_DIR} + PRIVATE ${_gRPC_UPB_INCLUDE_DIR} + PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} +) +target_link_libraries(gpr + ${_gRPC_ALLTARGETS_LIBRARIES} +) + +add_library(grpc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/init.cc + ${GRPC_SOURCE_DIR}/src/core/lib/avl/avl.cc + ${GRPC_SOURCE_DIR}/src/core/lib/backoff/backoff.cc + ${GRPC_SOURCE_DIR}/src/core/lib/channel/channel_args.cc + ${GRPC_SOURCE_DIR}/src/core/lib/channel/channel_stack.cc + ${GRPC_SOURCE_DIR}/src/core/lib/channel/channel_stack_builder.cc + ${GRPC_SOURCE_DIR}/src/core/lib/channel/channel_trace.cc + ${GRPC_SOURCE_DIR}/src/core/lib/channel/channelz.cc + ${GRPC_SOURCE_DIR}/src/core/lib/channel/channelz_registry.cc + ${GRPC_SOURCE_DIR}/src/core/lib/channel/connected_channel.cc + ${GRPC_SOURCE_DIR}/src/core/lib/channel/handshaker.cc + ${GRPC_SOURCE_DIR}/src/core/lib/channel/handshaker_registry.cc + ${GRPC_SOURCE_DIR}/src/core/lib/channel/status_util.cc + ${GRPC_SOURCE_DIR}/src/core/lib/compression/compression.cc + ${GRPC_SOURCE_DIR}/src/core/lib/compression/compression_args.cc + ${GRPC_SOURCE_DIR}/src/core/lib/compression/compression_internal.cc + ${GRPC_SOURCE_DIR}/src/core/lib/compression/message_compress.cc + ${GRPC_SOURCE_DIR}/src/core/lib/compression/stream_compression.cc + ${GRPC_SOURCE_DIR}/src/core/lib/compression/stream_compression_gzip.cc + ${GRPC_SOURCE_DIR}/src/core/lib/compression/stream_compression_identity.cc + ${GRPC_SOURCE_DIR}/src/core/lib/debug/stats.cc + ${GRPC_SOURCE_DIR}/src/core/lib/debug/stats_data.cc + ${GRPC_SOURCE_DIR}/src/core/lib/http/format_request.cc + ${GRPC_SOURCE_DIR}/src/core/lib/http/httpcli.cc + ${GRPC_SOURCE_DIR}/src/core/lib/http/parser.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/buffer_list.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/call_combiner.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/cfstream_handle.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/combiner.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/endpoint.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/endpoint_cfstream.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/endpoint_pair_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/endpoint_pair_uv.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/endpoint_pair_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/error.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/error_cfstream.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/ev_epoll1_linux.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/ev_epollex_linux.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/ev_poll_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/ev_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/ev_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/exec_ctx.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/executor.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/executor/mpmcqueue.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/executor/threadpool.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/fork_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/fork_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/gethostname_fallback.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/gethostname_host_name_max.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/gethostname_sysconf.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/grpc_if_nametoindex_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/grpc_if_nametoindex_unsupported.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/internal_errqueue.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/iocp_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/iomgr.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/iomgr_custom.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/iomgr_internal.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/iomgr_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/iomgr_posix_cfstream.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/iomgr_uv.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/iomgr_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/is_epollexclusive_available.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/load_file.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/lockfree_event.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/polling_entity.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/pollset.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/pollset_custom.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/pollset_set.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/pollset_set_custom.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/pollset_set_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/pollset_uv.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/pollset_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/resolve_address.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/resolve_address_custom.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/resolve_address_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/resolve_address_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/resource_quota.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/sockaddr_utils.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/socket_factory_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/socket_mutator.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/socket_utils_common_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/socket_utils_linux.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/socket_utils_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/socket_utils_uv.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/socket_utils_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/socket_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_client.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_client_cfstream.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_client_custom.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_client_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_client_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_custom.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_server.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_server_custom.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_server_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_server_utils_posix_common.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_server_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_uv.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/time_averaged_stats.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/timer.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/timer_custom.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/timer_generic.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/timer_heap.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/timer_manager.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/timer_uv.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/udp_server.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/unix_sockets_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/unix_sockets_posix_noop.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/wakeup_fd_eventfd.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/wakeup_fd_nospecial.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/wakeup_fd_pipe.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/wakeup_fd_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/json/json.cc + ${GRPC_SOURCE_DIR}/src/core/lib/json/json_reader.cc + ${GRPC_SOURCE_DIR}/src/core/lib/json/json_string.cc + ${GRPC_SOURCE_DIR}/src/core/lib/json/json_writer.cc + ${GRPC_SOURCE_DIR}/src/core/lib/slice/b64.cc + ${GRPC_SOURCE_DIR}/src/core/lib/slice/percent_encoding.cc + ${GRPC_SOURCE_DIR}/src/core/lib/slice/slice.cc + ${GRPC_SOURCE_DIR}/src/core/lib/slice/slice_buffer.cc + ${GRPC_SOURCE_DIR}/src/core/lib/slice/slice_intern.cc + ${GRPC_SOURCE_DIR}/src/core/lib/slice/slice_string_helpers.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/api_trace.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/byte_buffer.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/byte_buffer_reader.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/call.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/call_details.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/call_log_batch.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/channel.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/channel_init.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/channel_ping.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/channel_stack_type.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/completion_queue.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/completion_queue_factory.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/event_string.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/lame_client.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/metadata_array.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/server.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/validate_metadata.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/version.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/bdp_estimator.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/byte_stream.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/connectivity_state.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/error_utils.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/metadata.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/metadata_batch.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/pid_controller.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/static_metadata.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/status_conversion.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/status_metadata.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/timeout_encoding.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/transport.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/transport_op_string.cc + ${GRPC_SOURCE_DIR}/src/core/lib/uri/uri_parser.cc + ${GRPC_SOURCE_DIR}/src/core/lib/debug/trace.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/bin_decoder.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/bin_encoder.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/chttp2_plugin.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/chttp2_transport.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/context_list.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/flow_control.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/frame_data.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/frame_goaway.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/frame_ping.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/frame_settings.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/frame_window_update.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/hpack_encoder.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/hpack_parser.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/hpack_table.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/http2_settings.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/huffsyms.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/incoming_metadata.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/parsing.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/stream_lists.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/stream_map.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/varint.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/writing.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/alpn/alpn.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/http/client/http_client_filter.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/http/http_filters_plugin.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/http/message_compress/message_compress_filter.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/http/server/http_server_filter.cc + ${GRPC_SOURCE_DIR}/src/core/lib/http/httpcli_security_connector.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/context/security_context.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/alts/alts_credentials.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/composite/composite_credentials.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/credentials.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/credentials_metadata.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/fake/fake_credentials.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/google_default/credentials_generic.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/google_default/google_default_credentials.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/iam/iam_credentials.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/jwt/json_token.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/jwt/jwt_credentials.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/jwt/jwt_verifier.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/local/local_credentials.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/plugin/plugin_credentials.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/ssl/ssl_credentials.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/tls/spiffe_credentials.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/security_connector/alts/alts_security_connector.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/security_connector/fake/fake_security_connector.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/security_connector/load_system_roots_fallback.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/security_connector/load_system_roots_linux.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/security_connector/local/local_security_connector.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/security_connector/security_connector.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/security_connector/ssl_utils.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/security_connector/ssl_utils_config.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/security_connector/tls/spiffe_security_connector.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/transport/client_auth_filter.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/transport/secure_endpoint.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/transport/security_handshaker.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/transport/server_auth_filter.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/transport/target_authority_table.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/transport/tsi_error.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/util/json_util.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/init_secure.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/crypt/aes_gcm.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/crypt/gsec.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/frame_protector/alts_counter.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/frame_protector/alts_crypter.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/frame_protector/alts_frame_protector.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/frame_protector/alts_record_protocol_crypter_common.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/frame_protector/alts_seal_privacy_integrity_crypter.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/frame_protector/alts_unseal_privacy_integrity_crypter.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/frame_protector/frame_handler.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/handshaker/alts_handshaker_client.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/handshaker/alts_shared_resource.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_privacy_integrity_record_protocol.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/alts/check_gcp_environment.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/alts/check_gcp_environment_linux.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/alts/check_gcp_environment_no_op.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/alts/grpc_alts_credentials_client_options.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/alts/grpc_alts_credentials_options.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/alts/grpc_alts_credentials_server_options.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/handshaker/alts_tsi_utils.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/handshaker/transport_security_common_api.cc + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.c + ${GRPC_SOURCE_DIR}/third_party/upb/upb/decode.c + ${GRPC_SOURCE_DIR}/third_party/upb/upb/encode.c + ${GRPC_SOURCE_DIR}/third_party/upb/upb/msg.c + ${GRPC_SOURCE_DIR}/third_party/upb/upb/port.c + ${GRPC_SOURCE_DIR}/third_party/upb/upb/table.c + ${GRPC_SOURCE_DIR}/third_party/upb/upb/upb.c + ${GRPC_SOURCE_DIR}/src/core/tsi/transport_security.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/client/insecure/channel_create.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/client/authority.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/client/chttp2_connector.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/backend_metric.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/backup_poller.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/channel_connectivity.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/client_channel.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/client_channel_channelz.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/client_channel_factory.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/client_channel_plugin.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/connector.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/global_subchannel_pool.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/health/health_check_client.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/http_connect_handshaker.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/http_proxy.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/lb_policy.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/lb_policy_registry.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/local_subchannel_pool.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/parse_address.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/proxy_mapper.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/proxy_mapper_registry.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver_registry.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver_result_parsing.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolving_lb_policy.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/retry_throttle.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/server_address.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/service_config.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/subchannel.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/subchannel_pool_interface.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/deadline/deadline_filter.cc + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/gogoproto/gogo.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/validate/validate.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/api/annotations.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/api/http.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/protobuf/any.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/protobuf/duration.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/protobuf/empty.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/protobuf/struct.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/protobuf/timestamp.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/protobuf/wrappers.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/rpc/status.upb.c + ${GRPC_SOURCE_DIR}/src/core/tsi/fake_transport_security.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/local_transport_security.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/ssl/session_cache/ssl_session_cache.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/ssl/session_cache/ssl_session_openssl.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/ssl_transport_security.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/transport_security_grpc.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/server/chttp2_server.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/inproc/inproc_plugin.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/inproc/inproc_transport.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/xds/xds_api.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/xds/xds_bootstrap.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/xds/xds_channel_secure.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/xds/xds_client.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/xds/xds_client_stats.cc + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/api/v2/cds.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/api/v2/eds.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/type/percent.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/type/range.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_libuv.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_posix.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/census/grpc_context.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_idle/client_idle_filter.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/max_age/max_age_filter.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/message_size/message_size_filter.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/http/client_authority_filter.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/workarounds/workaround_utils.cc + ${GRPC_SOURCE_DIR}/src/core/plugin_registry/grpc_plugin_registry.cc +) + +target_compile_options(grpc PUBLIC -fpermissive) + +target_include_directories(grpc + PUBLIC ${GRPC_INCLUDE_DIR} + PRIVATE ${GRPC_SOURCE_DIR} + PRIVATE ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + PRIVATE ${_gRPC_CARES_INCLUDE_DIR} + PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR} + PRIVATE ${_gRPC_SSL_INCLUDE_DIR} + PRIVATE ${_gRPC_UPB_GENERATED_DIR} + PRIVATE ${_gRPC_UPB_GRPC_GENERATED_DIR} + PRIVATE ${_gRPC_UPB_INCLUDE_DIR} + PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} +) +target_link_libraries(grpc + ${_gRPC_BASELIB_LIBRARIES} + ${_gRPC_SSL_LIBRARIES} + ${_gRPC_ZLIB_LIBRARIES} + ${_gRPC_CARES_LIBRARIES} + ${_gRPC_ADDRESS_SORTING_LIBRARIES} + ${_gRPC_ALLTARGETS_LIBRARIES} + gpr +) +if (_gRPC_PLATFORM_MAC) + target_link_libraries(grpc "-framework CoreFoundation") +endif() + +add_library(grpc_cronet + ${GRPC_SOURCE_DIR}/src/core/ext/transport/cronet/plugin_registry/grpc_cronet_plugin_registry.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/init.cc + ${GRPC_SOURCE_DIR}/src/core/lib/avl/avl.cc + ${GRPC_SOURCE_DIR}/src/core/lib/backoff/backoff.cc + ${GRPC_SOURCE_DIR}/src/core/lib/channel/channel_args.cc + ${GRPC_SOURCE_DIR}/src/core/lib/channel/channel_stack.cc + ${GRPC_SOURCE_DIR}/src/core/lib/channel/channel_stack_builder.cc + ${GRPC_SOURCE_DIR}/src/core/lib/channel/channel_trace.cc + ${GRPC_SOURCE_DIR}/src/core/lib/channel/channelz.cc + ${GRPC_SOURCE_DIR}/src/core/lib/channel/channelz_registry.cc + ${GRPC_SOURCE_DIR}/src/core/lib/channel/connected_channel.cc + ${GRPC_SOURCE_DIR}/src/core/lib/channel/handshaker.cc + ${GRPC_SOURCE_DIR}/src/core/lib/channel/handshaker_registry.cc + ${GRPC_SOURCE_DIR}/src/core/lib/channel/status_util.cc + ${GRPC_SOURCE_DIR}/src/core/lib/compression/compression.cc + ${GRPC_SOURCE_DIR}/src/core/lib/compression/compression_args.cc + ${GRPC_SOURCE_DIR}/src/core/lib/compression/compression_internal.cc + ${GRPC_SOURCE_DIR}/src/core/lib/compression/message_compress.cc + ${GRPC_SOURCE_DIR}/src/core/lib/compression/stream_compression.cc + ${GRPC_SOURCE_DIR}/src/core/lib/compression/stream_compression_gzip.cc + ${GRPC_SOURCE_DIR}/src/core/lib/compression/stream_compression_identity.cc + ${GRPC_SOURCE_DIR}/src/core/lib/debug/stats.cc + ${GRPC_SOURCE_DIR}/src/core/lib/debug/stats_data.cc + ${GRPC_SOURCE_DIR}/src/core/lib/http/format_request.cc + ${GRPC_SOURCE_DIR}/src/core/lib/http/httpcli.cc + ${GRPC_SOURCE_DIR}/src/core/lib/http/parser.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/buffer_list.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/call_combiner.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/cfstream_handle.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/combiner.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/endpoint.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/endpoint_cfstream.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/endpoint_pair_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/endpoint_pair_uv.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/endpoint_pair_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/error.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/error_cfstream.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/ev_epoll1_linux.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/ev_epollex_linux.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/ev_poll_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/ev_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/ev_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/exec_ctx.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/executor.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/executor/mpmcqueue.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/executor/threadpool.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/fork_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/fork_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/gethostname_fallback.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/gethostname_host_name_max.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/gethostname_sysconf.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/grpc_if_nametoindex_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/grpc_if_nametoindex_unsupported.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/internal_errqueue.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/iocp_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/iomgr.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/iomgr_custom.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/iomgr_internal.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/iomgr_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/iomgr_posix_cfstream.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/iomgr_uv.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/iomgr_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/is_epollexclusive_available.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/load_file.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/lockfree_event.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/polling_entity.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/pollset.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/pollset_custom.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/pollset_set.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/pollset_set_custom.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/pollset_set_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/pollset_uv.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/pollset_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/resolve_address.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/resolve_address_custom.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/resolve_address_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/resolve_address_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/resource_quota.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/sockaddr_utils.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/socket_factory_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/socket_mutator.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/socket_utils_common_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/socket_utils_linux.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/socket_utils_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/socket_utils_uv.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/socket_utils_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/socket_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_client.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_client_cfstream.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_client_custom.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_client_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_client_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_custom.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_server.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_server_custom.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_server_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_server_utils_posix_common.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_server_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_uv.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/time_averaged_stats.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/timer.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/timer_custom.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/timer_generic.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/timer_heap.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/timer_manager.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/timer_uv.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/udp_server.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/unix_sockets_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/unix_sockets_posix_noop.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/wakeup_fd_eventfd.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/wakeup_fd_nospecial.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/wakeup_fd_pipe.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/wakeup_fd_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/json/json.cc + ${GRPC_SOURCE_DIR}/src/core/lib/json/json_reader.cc + ${GRPC_SOURCE_DIR}/src/core/lib/json/json_string.cc + ${GRPC_SOURCE_DIR}/src/core/lib/json/json_writer.cc + ${GRPC_SOURCE_DIR}/src/core/lib/slice/b64.cc + ${GRPC_SOURCE_DIR}/src/core/lib/slice/percent_encoding.cc + ${GRPC_SOURCE_DIR}/src/core/lib/slice/slice.cc + ${GRPC_SOURCE_DIR}/src/core/lib/slice/slice_buffer.cc + ${GRPC_SOURCE_DIR}/src/core/lib/slice/slice_intern.cc + ${GRPC_SOURCE_DIR}/src/core/lib/slice/slice_string_helpers.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/api_trace.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/byte_buffer.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/byte_buffer_reader.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/call.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/call_details.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/call_log_batch.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/channel.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/channel_init.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/channel_ping.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/channel_stack_type.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/completion_queue.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/completion_queue_factory.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/event_string.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/lame_client.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/metadata_array.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/server.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/validate_metadata.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/version.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/bdp_estimator.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/byte_stream.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/connectivity_state.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/error_utils.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/metadata.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/metadata_batch.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/pid_controller.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/static_metadata.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/status_conversion.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/status_metadata.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/timeout_encoding.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/transport.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/transport_op_string.cc + ${GRPC_SOURCE_DIR}/src/core/lib/uri/uri_parser.cc + ${GRPC_SOURCE_DIR}/src/core/lib/debug/trace.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/cronet/transport/cronet_api_dummy.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/cronet/transport/cronet_transport.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/bin_decoder.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/bin_encoder.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/chttp2_plugin.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/chttp2_transport.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/context_list.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/flow_control.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/frame_data.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/frame_goaway.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/frame_ping.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/frame_settings.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/frame_window_update.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/hpack_encoder.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/hpack_parser.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/hpack_table.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/http2_settings.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/huffsyms.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/incoming_metadata.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/parsing.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/stream_lists.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/stream_map.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/varint.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/writing.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/alpn/alpn.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/http/client/http_client_filter.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/http/http_filters_plugin.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/http/message_compress/message_compress_filter.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/http/server/http_server_filter.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/backend_metric.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/backup_poller.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/channel_connectivity.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/client_channel.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/client_channel_channelz.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/client_channel_factory.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/client_channel_plugin.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/connector.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/global_subchannel_pool.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/health/health_check_client.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/http_connect_handshaker.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/http_proxy.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/lb_policy.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/lb_policy_registry.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/local_subchannel_pool.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/parse_address.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/proxy_mapper.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/proxy_mapper_registry.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver_registry.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver_result_parsing.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolving_lb_policy.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/retry_throttle.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/server_address.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/service_config.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/subchannel.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/subchannel_pool_interface.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/deadline/deadline_filter.cc + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c + ${GRPC_SOURCE_DIR}/third_party/upb/upb/decode.c + ${GRPC_SOURCE_DIR}/third_party/upb/upb/encode.c + ${GRPC_SOURCE_DIR}/third_party/upb/upb/msg.c + ${GRPC_SOURCE_DIR}/third_party/upb/upb/port.c + ${GRPC_SOURCE_DIR}/third_party/upb/upb/table.c + ${GRPC_SOURCE_DIR}/third_party/upb/upb/upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/gogoproto/gogo.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/validate/validate.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/api/annotations.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/api/http.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/protobuf/any.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/protobuf/duration.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/protobuf/empty.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/protobuf/struct.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/protobuf/timestamp.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/protobuf/wrappers.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/rpc/status.upb.c + ${GRPC_SOURCE_DIR}/src/core/lib/http/httpcli_security_connector.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/context/security_context.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/alts/alts_credentials.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/composite/composite_credentials.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/credentials.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/credentials_metadata.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/fake/fake_credentials.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/google_default/credentials_generic.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/google_default/google_default_credentials.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/iam/iam_credentials.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/jwt/json_token.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/jwt/jwt_credentials.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/jwt/jwt_verifier.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/local/local_credentials.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/plugin/plugin_credentials.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/ssl/ssl_credentials.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/tls/spiffe_credentials.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/security_connector/alts/alts_security_connector.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/security_connector/fake/fake_security_connector.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/security_connector/load_system_roots_fallback.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/security_connector/load_system_roots_linux.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/security_connector/local/local_security_connector.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/security_connector/security_connector.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/security_connector/ssl_utils.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/security_connector/ssl_utils_config.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/security_connector/tls/spiffe_security_connector.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/transport/client_auth_filter.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/transport/secure_endpoint.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/transport/security_handshaker.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/transport/server_auth_filter.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/transport/target_authority_table.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/transport/tsi_error.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/util/json_util.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/init_secure.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/crypt/aes_gcm.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/crypt/gsec.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/frame_protector/alts_counter.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/frame_protector/alts_crypter.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/frame_protector/alts_frame_protector.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/frame_protector/alts_record_protocol_crypter_common.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/frame_protector/alts_seal_privacy_integrity_crypter.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/frame_protector/alts_unseal_privacy_integrity_crypter.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/frame_protector/frame_handler.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/handshaker/alts_handshaker_client.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/handshaker/alts_shared_resource.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_privacy_integrity_record_protocol.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/alts/check_gcp_environment.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/alts/check_gcp_environment_linux.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/alts/check_gcp_environment_no_op.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/alts/grpc_alts_credentials_client_options.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/alts/grpc_alts_credentials_options.cc + ${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/alts/grpc_alts_credentials_server_options.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/handshaker/alts_tsi_utils.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/alts/handshaker/transport_security_common_api.cc + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.c + ${GRPC_SOURCE_DIR}/src/core/tsi/transport_security.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/client/insecure/channel_create.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/client/authority.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/client/chttp2_connector.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/fake_transport_security.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/local_transport_security.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/ssl/session_cache/ssl_session_cache.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/ssl/session_cache/ssl_session_openssl.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/ssl_transport_security.cc + ${GRPC_SOURCE_DIR}/src/core/tsi/transport_security_grpc.cc +) + +target_include_directories(grpc_cronet + PUBLIC ${GRPC_INCLUDE_DIR} + PRIVATE ${GRPC_SOURCE_DIR} + PRIVATE ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + PRIVATE ${_gRPC_CARES_INCLUDE_DIR} + PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR} + PRIVATE ${_gRPC_SSL_INCLUDE_DIR} + PRIVATE ${_gRPC_UPB_GENERATED_DIR} + PRIVATE ${_gRPC_UPB_GRPC_GENERATED_DIR} + PRIVATE ${_gRPC_UPB_INCLUDE_DIR} + PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} +) +target_link_libraries(grpc_cronet + ${_gRPC_BASELIB_LIBRARIES} + ${_gRPC_SSL_LIBRARIES} + ${_gRPC_ZLIB_LIBRARIES} + ${_gRPC_CARES_LIBRARIES} + ${_gRPC_ADDRESS_SORTING_LIBRARIES} + ${_gRPC_ALLTARGETS_LIBRARIES} + gpr +) +if (_gRPC_PLATFORM_MAC) + target_link_libraries(grpc_cronet "-framework CoreFoundation") +endif() + +add_library(grpc_unsecure + ${GRPC_SOURCE_DIR}/src/core/lib/surface/init.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/init_unsecure.cc + ${GRPC_SOURCE_DIR}/src/core/lib/avl/avl.cc + ${GRPC_SOURCE_DIR}/src/core/lib/backoff/backoff.cc + ${GRPC_SOURCE_DIR}/src/core/lib/channel/channel_args.cc + ${GRPC_SOURCE_DIR}/src/core/lib/channel/channel_stack.cc + ${GRPC_SOURCE_DIR}/src/core/lib/channel/channel_stack_builder.cc + ${GRPC_SOURCE_DIR}/src/core/lib/channel/channel_trace.cc + ${GRPC_SOURCE_DIR}/src/core/lib/channel/channelz.cc + ${GRPC_SOURCE_DIR}/src/core/lib/channel/channelz_registry.cc + ${GRPC_SOURCE_DIR}/src/core/lib/channel/connected_channel.cc + ${GRPC_SOURCE_DIR}/src/core/lib/channel/handshaker.cc + ${GRPC_SOURCE_DIR}/src/core/lib/channel/handshaker_registry.cc + ${GRPC_SOURCE_DIR}/src/core/lib/channel/status_util.cc + ${GRPC_SOURCE_DIR}/src/core/lib/compression/compression.cc + ${GRPC_SOURCE_DIR}/src/core/lib/compression/compression_args.cc + ${GRPC_SOURCE_DIR}/src/core/lib/compression/compression_internal.cc + ${GRPC_SOURCE_DIR}/src/core/lib/compression/message_compress.cc + ${GRPC_SOURCE_DIR}/src/core/lib/compression/stream_compression.cc + ${GRPC_SOURCE_DIR}/src/core/lib/compression/stream_compression_gzip.cc + ${GRPC_SOURCE_DIR}/src/core/lib/compression/stream_compression_identity.cc + ${GRPC_SOURCE_DIR}/src/core/lib/debug/stats.cc + ${GRPC_SOURCE_DIR}/src/core/lib/debug/stats_data.cc + ${GRPC_SOURCE_DIR}/src/core/lib/http/format_request.cc + ${GRPC_SOURCE_DIR}/src/core/lib/http/httpcli.cc + ${GRPC_SOURCE_DIR}/src/core/lib/http/parser.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/buffer_list.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/call_combiner.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/cfstream_handle.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/combiner.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/endpoint.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/endpoint_cfstream.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/endpoint_pair_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/endpoint_pair_uv.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/endpoint_pair_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/error.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/error_cfstream.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/ev_epoll1_linux.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/ev_epollex_linux.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/ev_poll_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/ev_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/ev_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/exec_ctx.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/executor.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/executor/mpmcqueue.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/executor/threadpool.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/fork_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/fork_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/gethostname_fallback.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/gethostname_host_name_max.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/gethostname_sysconf.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/grpc_if_nametoindex_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/grpc_if_nametoindex_unsupported.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/internal_errqueue.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/iocp_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/iomgr.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/iomgr_custom.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/iomgr_internal.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/iomgr_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/iomgr_posix_cfstream.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/iomgr_uv.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/iomgr_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/is_epollexclusive_available.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/load_file.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/lockfree_event.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/polling_entity.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/pollset.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/pollset_custom.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/pollset_set.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/pollset_set_custom.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/pollset_set_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/pollset_uv.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/pollset_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/resolve_address.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/resolve_address_custom.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/resolve_address_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/resolve_address_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/resource_quota.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/sockaddr_utils.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/socket_factory_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/socket_mutator.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/socket_utils_common_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/socket_utils_linux.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/socket_utils_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/socket_utils_uv.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/socket_utils_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/socket_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_client.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_client_cfstream.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_client_custom.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_client_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_client_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_custom.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_server.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_server_custom.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_server_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_server_utils_posix_common.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_server_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_uv.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_windows.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/time_averaged_stats.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/timer.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/timer_custom.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/timer_generic.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/timer_heap.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/timer_manager.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/timer_uv.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/udp_server.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/unix_sockets_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/unix_sockets_posix_noop.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/wakeup_fd_eventfd.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/wakeup_fd_nospecial.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/wakeup_fd_pipe.cc + ${GRPC_SOURCE_DIR}/src/core/lib/iomgr/wakeup_fd_posix.cc + ${GRPC_SOURCE_DIR}/src/core/lib/json/json.cc + ${GRPC_SOURCE_DIR}/src/core/lib/json/json_reader.cc + ${GRPC_SOURCE_DIR}/src/core/lib/json/json_string.cc + ${GRPC_SOURCE_DIR}/src/core/lib/json/json_writer.cc + ${GRPC_SOURCE_DIR}/src/core/lib/slice/b64.cc + ${GRPC_SOURCE_DIR}/src/core/lib/slice/percent_encoding.cc + ${GRPC_SOURCE_DIR}/src/core/lib/slice/slice.cc + ${GRPC_SOURCE_DIR}/src/core/lib/slice/slice_buffer.cc + ${GRPC_SOURCE_DIR}/src/core/lib/slice/slice_intern.cc + ${GRPC_SOURCE_DIR}/src/core/lib/slice/slice_string_helpers.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/api_trace.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/byte_buffer.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/byte_buffer_reader.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/call.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/call_details.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/call_log_batch.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/channel.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/channel_init.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/channel_ping.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/channel_stack_type.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/completion_queue.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/completion_queue_factory.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/event_string.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/lame_client.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/metadata_array.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/server.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/validate_metadata.cc + ${GRPC_SOURCE_DIR}/src/core/lib/surface/version.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/bdp_estimator.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/byte_stream.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/connectivity_state.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/error_utils.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/metadata.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/metadata_batch.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/pid_controller.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/static_metadata.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/status_conversion.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/status_metadata.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/timeout_encoding.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/transport.cc + ${GRPC_SOURCE_DIR}/src/core/lib/transport/transport_op_string.cc + ${GRPC_SOURCE_DIR}/src/core/lib/uri/uri_parser.cc + ${GRPC_SOURCE_DIR}/src/core/lib/debug/trace.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/bin_decoder.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/bin_encoder.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/chttp2_plugin.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/chttp2_transport.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/context_list.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/flow_control.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/frame_data.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/frame_goaway.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/frame_ping.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/frame_settings.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/frame_window_update.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/hpack_encoder.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/hpack_parser.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/hpack_table.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/http2_settings.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/huffsyms.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/incoming_metadata.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/parsing.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/stream_lists.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/stream_map.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/varint.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/writing.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/alpn/alpn.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/http/client/http_client_filter.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/http/http_filters_plugin.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/http/message_compress/message_compress_filter.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/http/server/http_server_filter.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/server/chttp2_server.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/client/insecure/channel_create.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/client/authority.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/client/chttp2_connector.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/backend_metric.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/backup_poller.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/channel_connectivity.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/client_channel.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/client_channel_channelz.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/client_channel_factory.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/client_channel_plugin.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/connector.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/global_subchannel_pool.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/health/health_check_client.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/http_connect_handshaker.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/http_proxy.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/lb_policy.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/lb_policy_registry.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/local_subchannel_pool.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/parse_address.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/proxy_mapper.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/proxy_mapper_registry.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver_registry.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver_result_parsing.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolving_lb_policy.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/retry_throttle.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/server_address.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/service_config.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/subchannel.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/subchannel_pool_interface.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/deadline/deadline_filter.cc + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c + ${GRPC_SOURCE_DIR}/third_party/upb/upb/decode.c + ${GRPC_SOURCE_DIR}/third_party/upb/upb/encode.c + ${GRPC_SOURCE_DIR}/third_party/upb/upb/msg.c + ${GRPC_SOURCE_DIR}/third_party/upb/upb/port.c + ${GRPC_SOURCE_DIR}/third_party/upb/upb/table.c + ${GRPC_SOURCE_DIR}/third_party/upb/upb/upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/gogoproto/gogo.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/validate/validate.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/api/annotations.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/api/http.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/protobuf/any.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/protobuf/duration.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/protobuf/empty.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/protobuf/struct.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/protobuf/timestamp.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/protobuf/wrappers.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/rpc/status.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/transport/inproc/inproc_plugin.cc + ${GRPC_SOURCE_DIR}/src/core/ext/transport/inproc/inproc_transport.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_libuv.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_posix.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/xds/xds_api.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/xds/xds_bootstrap.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/xds/xds_channel.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/xds/xds_client.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/xds/xds_client_stats.cc + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/api/v2/cds.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/api/v2/eds.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/type/percent.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/envoy/type/range.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/census/grpc_context.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/client_idle/client_idle_filter.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/max_age/max_age_filter.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/message_size/message_size_filter.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/http/client_authority_filter.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc + ${GRPC_SOURCE_DIR}/src/core/ext/filters/workarounds/workaround_utils.cc + ${GRPC_SOURCE_DIR}/src/core/plugin_registry/grpc_unsecure_plugin_registry.cc +) + + +target_include_directories(grpc_unsecure + PUBLIC ${GRPC_INCLUDE_DIR} + PRIVATE ${GRPC_SOURCE_DIR} + PRIVATE ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + PRIVATE ${_gRPC_CARES_INCLUDE_DIR} + PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR} + PRIVATE ${_gRPC_SSL_INCLUDE_DIR} + PRIVATE ${_gRPC_UPB_GENERATED_DIR} + PRIVATE ${_gRPC_UPB_GRPC_GENERATED_DIR} + PRIVATE ${_gRPC_UPB_INCLUDE_DIR} + PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} +) +target_link_libraries(grpc_unsecure + ${_gRPC_BASELIB_LIBRARIES} + ${_gRPC_ZLIB_LIBRARIES} + ${_gRPC_CARES_LIBRARIES} + ${_gRPC_ADDRESS_SORTING_LIBRARIES} + ${_gRPC_ALLTARGETS_LIBRARIES} + gpr +) +if (_gRPC_PLATFORM_MAC) + target_link_libraries(grpc_unsecure "-framework CoreFoundation") +endif() + +add_library(grpc++ + ${GRPC_SOURCE_DIR}/src/cpp/client/insecure_credentials.cc + ${GRPC_SOURCE_DIR}/src/cpp/client/secure_credentials.cc + ${GRPC_SOURCE_DIR}/src/cpp/common/auth_property_iterator.cc + ${GRPC_SOURCE_DIR}/src/cpp/common/secure_auth_context.cc + ${GRPC_SOURCE_DIR}/src/cpp/common/secure_channel_arguments.cc + ${GRPC_SOURCE_DIR}/src/cpp/common/secure_create_auth_context.cc + ${GRPC_SOURCE_DIR}/src/cpp/common/tls_credentials_options.cc + ${GRPC_SOURCE_DIR}/src/cpp/common/tls_credentials_options_util.cc + ${GRPC_SOURCE_DIR}/src/cpp/server/insecure_server_credentials.cc + ${GRPC_SOURCE_DIR}/src/cpp/server/secure_server_credentials.cc + ${GRPC_SOURCE_DIR}/src/cpp/client/channel_cc.cc + ${GRPC_SOURCE_DIR}/src/cpp/client/client_context.cc + ${GRPC_SOURCE_DIR}/src/cpp/client/client_interceptor.cc + ${GRPC_SOURCE_DIR}/src/cpp/client/create_channel.cc + ${GRPC_SOURCE_DIR}/src/cpp/client/create_channel_internal.cc + ${GRPC_SOURCE_DIR}/src/cpp/client/create_channel_posix.cc + ${GRPC_SOURCE_DIR}/src/cpp/client/credentials_cc.cc + ${GRPC_SOURCE_DIR}/src/cpp/client/generic_stub.cc + ${GRPC_SOURCE_DIR}/src/cpp/common/alarm.cc + ${GRPC_SOURCE_DIR}/src/cpp/common/channel_arguments.cc + ${GRPC_SOURCE_DIR}/src/cpp/common/channel_filter.cc + ${GRPC_SOURCE_DIR}/src/cpp/common/completion_queue_cc.cc + ${GRPC_SOURCE_DIR}/src/cpp/common/core_codegen.cc + ${GRPC_SOURCE_DIR}/src/cpp/common/resource_quota_cc.cc + ${GRPC_SOURCE_DIR}/src/cpp/common/rpc_method.cc + ${GRPC_SOURCE_DIR}/src/cpp/common/validate_service_config.cc + ${GRPC_SOURCE_DIR}/src/cpp/common/version_cc.cc + ${GRPC_SOURCE_DIR}/src/cpp/server/async_generic_service.cc + ${GRPC_SOURCE_DIR}/src/cpp/server/channel_argument_option.cc + ${GRPC_SOURCE_DIR}/src/cpp/server/create_default_thread_pool.cc + ${GRPC_SOURCE_DIR}/src/cpp/server/dynamic_thread_pool.cc + ${GRPC_SOURCE_DIR}/src/cpp/server/external_connection_acceptor_impl.cc + ${GRPC_SOURCE_DIR}/src/cpp/server/health/default_health_check_service.cc + ${GRPC_SOURCE_DIR}/src/cpp/server/health/health_check_service.cc + ${GRPC_SOURCE_DIR}/src/cpp/server/health/health_check_service_server_builder_option.cc + ${GRPC_SOURCE_DIR}/src/cpp/server/server_builder.cc + ${GRPC_SOURCE_DIR}/src/cpp/server/server_cc.cc + ${GRPC_SOURCE_DIR}/src/cpp/server/server_context.cc + ${GRPC_SOURCE_DIR}/src/cpp/server/server_credentials.cc + ${GRPC_SOURCE_DIR}/src/cpp/server/server_posix.cc + ${GRPC_SOURCE_DIR}/src/cpp/thread_manager/thread_manager.cc + ${GRPC_SOURCE_DIR}/src/cpp/util/byte_buffer_cc.cc + ${GRPC_SOURCE_DIR}/src/cpp/util/status.cc + ${GRPC_SOURCE_DIR}/src/cpp/util/string_ref.cc + ${GRPC_SOURCE_DIR}/src/cpp/util/time_cc.cc + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c + ${GRPC_SOURCE_DIR}/third_party/upb/upb/decode.c + ${GRPC_SOURCE_DIR}/third_party/upb/upb/encode.c + ${GRPC_SOURCE_DIR}/third_party/upb/upb/msg.c + ${GRPC_SOURCE_DIR}/third_party/upb/upb/port.c + ${GRPC_SOURCE_DIR}/third_party/upb/upb/table.c + ${GRPC_SOURCE_DIR}/third_party/upb/upb/upb.c + ${GRPC_SOURCE_DIR}/src/cpp/codegen/codegen_init.cc +) + +target_compile_options(grpc++ PUBLIC -Wno-error=shadow) + +target_include_directories(grpc++ + PUBLIC ${GRPC_INCLUDE_DIR} + PRIVATE ${GRPC_SOURCE_DIR} + PRIVATE ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + PRIVATE ${_gRPC_CARES_INCLUDE_DIR} + PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR} + PRIVATE ${_gRPC_SSL_INCLUDE_DIR} + PRIVATE ${_gRPC_UPB_GENERATED_DIR} + PRIVATE ${_gRPC_UPB_GRPC_GENERATED_DIR} + PRIVATE ${_gRPC_UPB_INCLUDE_DIR} + PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} + PRIVATE ${_gRPC_PROTO_GENS_DIR} +) +target_link_libraries(grpc++ + ${_gRPC_BASELIB_LIBRARIES} + ${_gRPC_SSL_LIBRARIES} + ${_gRPC_PROTOBUF_LIBRARIES} + ${_gRPC_ALLTARGETS_LIBRARIES} + grpc + gpr +) + +add_library(grpc++_unsecure + ${GRPC_SOURCE_DIR}/src/cpp/client/insecure_credentials.cc + ${GRPC_SOURCE_DIR}/src/cpp/common/insecure_create_auth_context.cc + ${GRPC_SOURCE_DIR}/src/cpp/server/insecure_server_credentials.cc + ${GRPC_SOURCE_DIR}/src/cpp/client/channel_cc.cc + ${GRPC_SOURCE_DIR}/src/cpp/client/client_context.cc + ${GRPC_SOURCE_DIR}/src/cpp/client/client_interceptor.cc + ${GRPC_SOURCE_DIR}/src/cpp/client/create_channel.cc + ${GRPC_SOURCE_DIR}/src/cpp/client/create_channel_internal.cc + ${GRPC_SOURCE_DIR}/src/cpp/client/create_channel_posix.cc + ${GRPC_SOURCE_DIR}/src/cpp/client/credentials_cc.cc + ${GRPC_SOURCE_DIR}/src/cpp/client/generic_stub.cc + ${GRPC_SOURCE_DIR}/src/cpp/common/alarm.cc + ${GRPC_SOURCE_DIR}/src/cpp/common/channel_arguments.cc + ${GRPC_SOURCE_DIR}/src/cpp/common/channel_filter.cc + ${GRPC_SOURCE_DIR}/src/cpp/common/completion_queue_cc.cc + ${GRPC_SOURCE_DIR}/src/cpp/common/core_codegen.cc + ${GRPC_SOURCE_DIR}/src/cpp/common/resource_quota_cc.cc + ${GRPC_SOURCE_DIR}/src/cpp/common/rpc_method.cc + ${GRPC_SOURCE_DIR}/src/cpp/common/validate_service_config.cc + ${GRPC_SOURCE_DIR}/src/cpp/common/version_cc.cc + ${GRPC_SOURCE_DIR}/src/cpp/server/async_generic_service.cc + ${GRPC_SOURCE_DIR}/src/cpp/server/channel_argument_option.cc + ${GRPC_SOURCE_DIR}/src/cpp/server/create_default_thread_pool.cc + ${GRPC_SOURCE_DIR}/src/cpp/server/dynamic_thread_pool.cc + ${GRPC_SOURCE_DIR}/src/cpp/server/external_connection_acceptor_impl.cc + ${GRPC_SOURCE_DIR}/src/cpp/server/health/default_health_check_service.cc + ${GRPC_SOURCE_DIR}/src/cpp/server/health/health_check_service.cc + ${GRPC_SOURCE_DIR}/src/cpp/server/health/health_check_service_server_builder_option.cc + ${GRPC_SOURCE_DIR}/src/cpp/server/server_builder.cc + ${GRPC_SOURCE_DIR}/src/cpp/server/server_cc.cc + ${GRPC_SOURCE_DIR}/src/cpp/server/server_context.cc + ${GRPC_SOURCE_DIR}/src/cpp/server/server_credentials.cc + ${GRPC_SOURCE_DIR}/src/cpp/server/server_posix.cc + ${GRPC_SOURCE_DIR}/src/cpp/thread_manager/thread_manager.cc + ${GRPC_SOURCE_DIR}/src/cpp/util/byte_buffer_cc.cc + ${GRPC_SOURCE_DIR}/src/cpp/util/status.cc + ${GRPC_SOURCE_DIR}/src/cpp/util/string_ref.cc + ${GRPC_SOURCE_DIR}/src/cpp/util/time_cc.cc + ${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c + ${GRPC_SOURCE_DIR}/third_party/upb/upb/decode.c + ${GRPC_SOURCE_DIR}/third_party/upb/upb/encode.c + ${GRPC_SOURCE_DIR}/third_party/upb/upb/msg.c + ${GRPC_SOURCE_DIR}/third_party/upb/upb/port.c + ${GRPC_SOURCE_DIR}/third_party/upb/upb/table.c + ${GRPC_SOURCE_DIR}/third_party/upb/upb/upb.c + ${GRPC_SOURCE_DIR}/src/cpp/codegen/codegen_init.cc +) + +target_compile_options(grpc++_unsecure PUBLIC -Wno-error=shadow) + +target_include_directories(grpc++_unsecure + PUBLIC ${GRPC_INCLUDE_DIR} + PRIVATE ${GRPC_SOURCE_DIR} + PRIVATE ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + PRIVATE ${_gRPC_CARES_INCLUDE_DIR} + PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR} + PRIVATE ${_gRPC_SSL_INCLUDE_DIR} + PRIVATE ${_gRPC_UPB_GENERATED_DIR} + PRIVATE ${_gRPC_UPB_GRPC_GENERATED_DIR} + PRIVATE ${_gRPC_UPB_INCLUDE_DIR} + PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} + PRIVATE ${_gRPC_PROTO_GENS_DIR} +) +target_link_libraries(grpc++_unsecure + ${_gRPC_BASELIB_LIBRARIES} + ${_gRPC_PROTOBUF_LIBRARIES} + ${_gRPC_ALLTARGETS_LIBRARIES} + gpr + grpc_unsecure +) + +add_library(grpc_plugin_support + ${GRPC_SOURCE_DIR}/src/compiler/cpp_generator.cc +) + +target_include_directories(grpc_plugin_support + PRIVATE ${GRPC_SOURCE_DIR} + PUBLIC ${GRPC_INCLUDE_DIR} + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR} + PRIVATE ${_gRPC_CARES_INCLUDE_DIR} + PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR} + PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR} + PRIVATE ${_gRPC_SSL_INCLUDE_DIR} + PRIVATE ${_gRPC_UPB_GENERATED_DIR} + PRIVATE ${_gRPC_UPB_GRPC_GENERATED_DIR} + PRIVATE ${_gRPC_UPB_INCLUDE_DIR} + PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} + PRIVATE ${_gRPC_PROTO_GENS_DIR} +) +target_link_libraries(grpc_plugin_support + ${_gRPC_PROTOBUF_PROTOC_LIBRARIES} + ${_gRPC_PROTOBUF_LIBRARIES} + ${_gRPC_ALLTARGETS_LIBRARIES} +) + +add_executable(grpc_cpp_plugin + ${GRPC_SOURCE_DIR}/src/compiler/cpp_plugin.cc +) + +target_include_directories(grpc_cpp_plugin + PRIVATE ${GRPC_SOURCE_DIR} + PUBLIC ${GRPC_INCLUDE_DIR} + PRIVATE ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR} + PRIVATE ${_gRPC_CARES_INCLUDE_DIR} + PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR} + PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR} + PRIVATE ${_gRPC_SSL_INCLUDE_DIR} + PRIVATE ${_gRPC_UPB_GENERATED_DIR} + PRIVATE ${_gRPC_UPB_GRPC_GENERATED_DIR} + PRIVATE ${_gRPC_UPB_INCLUDE_DIR} + PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} + PRIVATE ${_gRPC_PROTO_GENS_DIR} +) + +target_link_libraries(grpc_cpp_plugin + ${_gRPC_PROTOBUF_PROTOC_LIBRARIES} + ${_gRPC_PROTOBUF_LIBRARIES} + ${_gRPC_ALLTARGETS_LIBRARIES} + grpc_plugin_support +) \ No newline at end of file From 13643d825ba3192323d337bbda2f4c71fba759b9 Mon Sep 17 00:00:00 2001 From: Aleksei Levushkin Date: Sun, 29 Dec 2019 14:40:55 +0300 Subject: [PATCH 003/134] added PROTOBUF_GENERATE_GRPC_CPP for generating grpc proto --- CMakeLists.txt | 1 + cmake/find/grpc.cmake | 57 +++++++++++++++++++++++++++++++ contrib/grpc-cmake/CMakeLists.txt | 3 +- 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 cmake/find/grpc.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 986096ba9e8..229b83c947d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -323,6 +323,7 @@ endif() include (cmake/find/libxml2.cmake) include (cmake/find/brotli.cmake) include (cmake/find/protobuf.cmake) +include (cmake/find/grpc.cmake) include (cmake/find/pdqsort.cmake) include (cmake/find/hdfs3.cmake) # uses protobuf include (cmake/find/consistent-hashing.cmake) diff --git a/cmake/find/grpc.cmake b/cmake/find/grpc.cmake new file mode 100644 index 00000000000..e19cac5cf5f --- /dev/null +++ b/cmake/find/grpc.cmake @@ -0,0 +1,57 @@ +set(_PROTOBUF_PROTOC $) +set(_GRPC_CPP_PLUGIN_EXECUTABLE $) + +function(PROTOBUF_GENERATE_GRPC_CPP SRCS HDRS) + if(NOT ARGN) + message(SEND_ERROR "Error: PROTOBUF_GENERATE_GRPC_CPP() called without any proto files") + return() + endif() + + if(PROTOBUF_GENERATE_CPP_APPEND_PATH) + foreach(FIL ${ARGN}) + get_filename_component(ABS_FIL ${FIL} ABSOLUTE) + get_filename_component(ABS_PATH ${ABS_FIL} PATH) + list(FIND _protobuf_include_path ${ABS_PATH} _contains_already) + if(${_contains_already} EQUAL -1) + list(APPEND _protobuf_include_path -I ${ABS_PATH}) + endif() + endforeach() + else() + set(_protobuf_include_path -I ${CMAKE_CURRENT_SOURCE_DIR}) + endif() + + if(DEFINED PROTOBUF_IMPORT_DIRS) + foreach(DIR ${Protobuf_IMPORT_DIRS}) + get_filename_component(ABS_PATH ${DIR} ABSOLUTE) + list(FIND _protobuf_include_path ${ABS_PATH} _contains_already) + if(${_contains_already} EQUAL -1) + list(APPEND _protobuf_include_path -I ${ABS_PATH}) + endif() + endforeach() + endif() + + set(${SRCS}) + set(${HDRS}) + foreach(FIL ${ARGN}) + get_filename_component(ABS_FIL ${FIL} ABSOLUTE) + get_filename_component(FIL_WE ${FIL} NAME_WE) + + list(APPEND ${SRCS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.grpc.pb.cc") + list(APPEND ${HDRS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.grpc.pb.h") + + add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.grpc.pb.cc" + "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.grpc.pb.h" + COMMAND ${_PROTOBUF_PROTOC} + ARGS --grpc_out=${CMAKE_CURRENT_BINARY_DIR} + --plugin=protoc-gen-grpc=${_GRPC_CPP_PLUGIN_EXECUTABLE} + ${_protobuf_include_path} ${ABS_FIL} + DEPENDS ${ABS_FIL} + COMMENT "Running gRPC C++ protocol buffer compiler on ${FIL}" + VERBATIM) + endforeach() + + set_source_files_properties(${${SRCS}} ${${HDRS}} PROPERTIES GENERATED TRUE) + set(${SRCS} ${${SRCS}} PARENT_SCOPE) + set(${HDRS} ${${HDRS}} PARENT_SCOPE) +endfunction() diff --git a/contrib/grpc-cmake/CMakeLists.txt b/contrib/grpc-cmake/CMakeLists.txt index 85f3e6c6737..cc1c2b52b51 100644 --- a/contrib/grpc-cmake/CMakeLists.txt +++ b/contrib/grpc-cmake/CMakeLists.txt @@ -1479,4 +1479,5 @@ target_link_libraries(grpc_cpp_plugin ${_gRPC_PROTOBUF_LIBRARIES} ${_gRPC_ALLTARGETS_LIBRARIES} grpc_plugin_support -) \ No newline at end of file +) + From 236f461420c121172783ffa63a369aa527c06582 Mon Sep 17 00:00:00 2001 From: millb Date: Thu, 30 Jan 2020 14:15:43 +0300 Subject: [PATCH 004/134] attempt --- dbms/src/Interpreters/Cluster.cpp | 24 +++++++++++++++++------- dbms/src/Interpreters/Cluster.h | 7 ++++--- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/dbms/src/Interpreters/Cluster.cpp b/dbms/src/Interpreters/Cluster.cpp index 71bd89b2b6f..5473c3f7762 100644 --- a/dbms/src/Interpreters/Cluster.cpp +++ b/dbms/src/Interpreters/Cluster.cpp @@ -72,7 +72,8 @@ bool Cluster::Address::isLocal(UInt16 clickhouse_port) const } -Cluster::Address::Address(const Poco::Util::AbstractConfiguration & config, const String & config_prefix) +Cluster::Address::Address(const Poco::Util::AbstractConfiguration & config, const String & config_prefix, UInt32 shard_number_, UInt32 replica_number_) : + shard_number(shard_number_), replica_number(replica_number_) { host_name = config.getString(config_prefix + ".host"); port = static_cast(config.getInt(config_prefix + ".port")); @@ -137,12 +138,13 @@ std::pair Cluster::Address::fromString(const String & host_port_ String Cluster::Address::toFullString() const { return - escapeForFileName(user) + - (password.empty() ? "" : (':' + escapeForFileName(password))) + '@' + + ((shard_number == 0) ? "" : "shard" + std::to_string(shard_number)) + + ((replica_number == 0) ? "" : "_replica" + std::to_string(replica_number)) + '@' + escapeForFileName(host_name) + ':' + std::to_string(port) + - (default_database.empty() ? "" : ('#' + escapeForFileName(default_database))) - + ((secure == Protocol::Secure::Enable) ? "+secure" : ""); + (default_database.empty() ? "" : ('#' + + escapeForFileName(default_database))) + + ((secure == Protocol::Secure::Enable) ? "+secure" : ""); } Cluster::Address Cluster::Address::fromFullString(const String & full_string) @@ -158,8 +160,14 @@ Cluster::Address Cluster::Address::fromFullString(const String & full_string) secure = Protocol::Secure::Enable; } + + const char * underscore = strchr(full_string.data(), '_'); + const char * slash = strchr(full_string.data(), '/'); const char * user_pw_end = strchr(full_string.data(), '@'); const char * colon = strchr(full_string.data(), ':'); + const bool has_shard = startsWith(full_string, "shard"); + if (has_shard && !slash) + throw Exception("Incorrect [shard{shard_number}[_replica{replica_number}]]/user[:password]@host:port#default_database format " + full_string, ErrorCodes::SYNTAX_ERROR); if (!user_pw_end || !colon) throw Exception("Incorrect user[:password]@host:port#default_database format " + full_string, ErrorCodes::SYNTAX_ERROR); @@ -175,9 +183,11 @@ Cluster::Address Cluster::Address::fromFullString(const String & full_string) address.secure = secure; address.port = parse(host_end + 1, port_end - (host_end + 1)); address.host_name = unescapeForFileName(std::string(user_pw_end + 1, host_end)); - address.user = unescapeForFileName(std::string(address_begin, has_pw ? colon : user_pw_end)); + address.user = unescapeForFileName(std::string(slash + 1, has_pw ? colon : user_pw_end)); address.password = has_pw ? unescapeForFileName(std::string(colon + 1, user_pw_end)) : std::string(); address.default_database = has_db ? unescapeForFileName(std::string(has_db + 1, address_end)) : std::string(); + address.shard_number = has_shard ? parse(address_begin + 5) : 0; + address.replica_number = underscore ? parse(underscore + 8) : 0; return address; } @@ -309,7 +319,7 @@ Cluster::Cluster(const Poco::Util::AbstractConfiguration & config, const Setting if (startsWith(replica_key, "replica")) { - replica_addresses.emplace_back(config, partial_prefix + replica_key); + replica_addresses.emplace_back(config, partial_prefix + replica_key, current_shard_num, current_replica_num); ++current_replica_num; if (!replica_addresses.back().is_local) diff --git a/dbms/src/Interpreters/Cluster.h b/dbms/src/Interpreters/Cluster.h index ef12f9fe78f..3d769bf9c7b 100644 --- a/dbms/src/Interpreters/Cluster.h +++ b/dbms/src/Interpreters/Cluster.h @@ -57,6 +57,8 @@ public: UInt16 port; String user; String password; + UInt32 shard_number{}; + UInt32 replica_number{}; /// This database is selected when no database is specified for Distributed table String default_database; /// The locality is determined at the initialization, and is not changed even if DNS is changed @@ -67,9 +69,8 @@ public: Protocol::Secure secure = Protocol::Secure::Disable; Address() = default; - Address(const Poco::Util::AbstractConfiguration & config, const String & config_prefix); + Address(const Poco::Util::AbstractConfiguration & config, const String & config_prefix, UInt32 shard_number_ = 0, UInt32 replica_number_ = 0); Address(const String & host_port_, const String & user_, const String & password_, UInt16 clickhouse_port, bool secure_ = false); - /// Returns 'escaped_host_name:port' String toString() const; @@ -80,7 +81,7 @@ public: static std::pair fromString(const String & host_port_string); - /// Retrurns escaped user:password@resolved_host_address:resolved_host_port#default_database + /// Retrurns escaped shard{shard_number}_replica{replica_number}@resolved_host_address:resolved_host_port#default_database String toFullString() const; static Address fromFullString(const String & address_full_string); From 165afabdd247150df6bb9763cf3015a546d16a94 Mon Sep 17 00:00:00 2001 From: millb Date: Fri, 31 Jan 2020 12:22:30 +0300 Subject: [PATCH 005/134] second attempt --- dbms/src/Interpreters/Cluster.cpp | 42 ++----------------- dbms/src/Interpreters/Cluster.h | 5 ++- .../Storages/Distributed/DirectoryMonitor.cpp | 19 ++------- 3 files changed, 10 insertions(+), 56 deletions(-) diff --git a/dbms/src/Interpreters/Cluster.cpp b/dbms/src/Interpreters/Cluster.cpp index 5473c3f7762..e8b95a4dc47 100644 --- a/dbms/src/Interpreters/Cluster.cpp +++ b/dbms/src/Interpreters/Cluster.cpp @@ -139,53 +139,17 @@ String Cluster::Address::toFullString() const { return ((shard_number == 0) ? "" : "shard" + std::to_string(shard_number)) + - ((replica_number == 0) ? "" : "_replica" + std::to_string(replica_number)) + '@' + - escapeForFileName(host_name) + ':' + - std::to_string(port) + - (default_database.empty() ? "" : ('#' + - escapeForFileName(default_database))) + - ((secure == Protocol::Secure::Enable) ? "+secure" : ""); + ((replica_number == 0) ? "" : "_replica" + std::to_string(replica_number)); } Cluster::Address Cluster::Address::fromFullString(const String & full_string) { const char * address_begin = full_string.data(); - const char * address_end = address_begin + full_string.size(); - Protocol::Secure secure = Protocol::Secure::Disable; - const char * secure_tag = "+secure"; - if (endsWith(full_string, secure_tag)) - { - address_end -= strlen(secure_tag); - secure = Protocol::Secure::Enable; - } - - - const char * underscore = strchr(full_string.data(), '_'); - const char * slash = strchr(full_string.data(), '/'); - const char * user_pw_end = strchr(full_string.data(), '@'); - const char * colon = strchr(full_string.data(), ':'); - const bool has_shard = startsWith(full_string, "shard"); - if (has_shard && !slash) - throw Exception("Incorrect [shard{shard_number}[_replica{replica_number}]]/user[:password]@host:port#default_database format " + full_string, ErrorCodes::SYNTAX_ERROR); - if (!user_pw_end || !colon) - throw Exception("Incorrect user[:password]@host:port#default_database format " + full_string, ErrorCodes::SYNTAX_ERROR); - - const bool has_pw = colon < user_pw_end; - const char * host_end = has_pw ? strchr(user_pw_end + 1, ':') : colon; - if (!host_end) - throw Exception("Incorrect address '" + full_string + "', it does not contain port", ErrorCodes::SYNTAX_ERROR); - - const char * has_db = strchr(full_string.data(), '#'); - const char * port_end = has_db ? has_db : address_end; + bool has_shard = startsWith("shard", full_string); + bool underscore = strchr(full_string.data(), '_'); Address address; - address.secure = secure; - address.port = parse(host_end + 1, port_end - (host_end + 1)); - address.host_name = unescapeForFileName(std::string(user_pw_end + 1, host_end)); - address.user = unescapeForFileName(std::string(slash + 1, has_pw ? colon : user_pw_end)); - address.password = has_pw ? unescapeForFileName(std::string(colon + 1, user_pw_end)) : std::string(); - address.default_database = has_db ? unescapeForFileName(std::string(has_db + 1, address_end)) : std::string(); address.shard_number = has_shard ? parse(address_begin + 5) : 0; address.replica_number = underscore ? parse(underscore + 8) : 0; return address; diff --git a/dbms/src/Interpreters/Cluster.h b/dbms/src/Interpreters/Cluster.h index 3d769bf9c7b..b1cbdb22e9a 100644 --- a/dbms/src/Interpreters/Cluster.h +++ b/dbms/src/Interpreters/Cluster.h @@ -57,8 +57,9 @@ public: UInt16 port; String user; String password; - UInt32 shard_number{}; - UInt32 replica_number{}; + UInt32 shard_number{}; /// shard serial number in configuration file + UInt32 replica_number{}; /// replica serial number in this shard + /// This database is selected when no database is specified for Distributed table String default_database; /// The locality is determined at the initialization, and is not changed even if DNS is changed diff --git a/dbms/src/Storages/Distributed/DirectoryMonitor.cpp b/dbms/src/Storages/Distributed/DirectoryMonitor.cpp index 43a595cde6f..ea9a659314b 100644 --- a/dbms/src/Storages/Distributed/DirectoryMonitor.cpp +++ b/dbms/src/Storages/Distributed/DirectoryMonitor.cpp @@ -188,25 +188,14 @@ ConnectionPoolPtr StorageDistributedDirectoryMonitor::createPool(const std::stri { const auto & cluster = storage.getCluster(); const auto & shards_info = cluster->getShardsInfo(); - const auto & shards_addresses = cluster->getShardsAddresses(); + // const auto & shards_addresses = cluster->getShardsInfo(); /// existing connections pool have a higher priority - for (size_t shard_index = 0; shard_index < shards_info.size(); ++shard_index) - { - const Cluster::Addresses & replicas_addresses = shards_addresses[shard_index]; + return shards_info[address.shard_number].per_replica_pools[address.replica_number]; - for (size_t replica_index = 0; replica_index < replicas_addresses.size(); ++replica_index) - { - const Cluster::Address & replica_address = replicas_addresses[replica_index]; - - if (address == replica_address) - return shards_info[shard_index].per_replica_pools[replica_index]; - } - } - - return std::make_shared( + /*return std::make_shared( 1, address.host_name, address.port, address.default_database, address.user, address.password, - storage.getName() + '_' + address.user, Protocol::Compression::Enable, address.secure); + storage.getName() + '_' + address.user, Protocol::Compression::Enable, address.secure);*/ }; auto pools = createPoolsForAddresses(name, pool_factory); From 613b7314f64f8d4c23ce9dc985e1a0ed3fa43d33 Mon Sep 17 00:00:00 2001 From: millb Date: Fri, 31 Jan 2020 12:29:28 +0300 Subject: [PATCH 006/134] fixed bugs --- dbms/src/Interpreters/Cluster.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbms/src/Interpreters/Cluster.cpp b/dbms/src/Interpreters/Cluster.cpp index e8b95a4dc47..18657bc94cf 100644 --- a/dbms/src/Interpreters/Cluster.cpp +++ b/dbms/src/Interpreters/Cluster.cpp @@ -147,7 +147,7 @@ Cluster::Address Cluster::Address::fromFullString(const String & full_string) const char * address_begin = full_string.data(); bool has_shard = startsWith("shard", full_string); - bool underscore = strchr(full_string.data(), '_'); + const char * underscore = strchr(full_string.data(), '_'); Address address; address.shard_number = has_shard ? parse(address_begin + 5) : 0; From 2dab300ad4b86c29942d77f51087db4217ef8396 Mon Sep 17 00:00:00 2001 From: millb Date: Fri, 31 Jan 2020 13:49:10 +0300 Subject: [PATCH 007/134] attempt --- dbms/src/Interpreters/Cluster.cpp | 47 +++++++++++++++++++++++++++---- dbms/src/Interpreters/Cluster.h | 10 ++++--- 2 files changed, 47 insertions(+), 10 deletions(-) diff --git a/dbms/src/Interpreters/Cluster.cpp b/dbms/src/Interpreters/Cluster.cpp index 18657bc94cf..d390ce8cbaa 100644 --- a/dbms/src/Interpreters/Cluster.cpp +++ b/dbms/src/Interpreters/Cluster.cpp @@ -72,8 +72,8 @@ bool Cluster::Address::isLocal(UInt16 clickhouse_port) const } -Cluster::Address::Address(const Poco::Util::AbstractConfiguration & config, const String & config_prefix, UInt32 shard_number_, UInt32 replica_number_) : - shard_number(shard_number_), replica_number(replica_number_) +Cluster::Address::Address(const Poco::Util::AbstractConfiguration & config, const String & config_prefix, UInt32 shard_index_, UInt32 replica_index_) : + shard_index(shard_index_), replica_index(replica_index_) { host_name = config.getString(config_prefix + ".host"); port = static_cast(config.getInt(config_prefix + ".port")); @@ -145,13 +145,48 @@ String Cluster::Address::toFullString() const Cluster::Address Cluster::Address::fromFullString(const String & full_string) { const char * address_begin = full_string.data(); + const char * address_end = address_begin + full_string.size(); - bool has_shard = startsWith("shard", full_string); - const char * underscore = strchr(full_string.data(), '_'); + Protocol::Secure secure = Protocol::Secure::Disable; + const char * secure_tag = "+secure"; + if (endsWith(full_string, secure_tag)) + { + address_end -= strlen(secure_tag); + secure = Protocol::Secure::Enable; + } + + const char * user_pw_end = strchr(full_string.data(), '@'); + + /// parsing with format [shard{shard_number}[_replica{replica_number}]] + if (!user_pw_end && startsWith("shard", full_string)) + { + const char * underscore = strchr(full_string.data(), '_'); + + Address address; + address.shard_index = parse(address_begin + 5); + address.replica_index = underscore ? parse(underscore + 8) : 0; + return address; + } + + const char * colon = strchr(full_string.data(), ':'); + if (!user_pw_end || !colon) + throw Exception("Incorrect user[:password]@host:port#default_database format " + full_string, ErrorCodes::SYNTAX_ERROR); + + const bool has_pw = colon < user_pw_end; + const char * host_end = has_pw ? strchr(user_pw_end + 1, ':') : colon; + if (!host_end) + throw Exception("Incorrect address '" + full_string + "', it does not contain port", ErrorCodes::SYNTAX_ERROR); + + const char * has_db = strchr(full_string.data(), '#'); + const char * port_end = has_db ? has_db : address_end; Address address; - address.shard_number = has_shard ? parse(address_begin + 5) : 0; - address.replica_number = underscore ? parse(underscore + 8) : 0; + address.secure = secure; + address.port = parse(host_end + 1, port_end - (host_end + 1)); + address.host_name = unescapeForFileName(std::string(user_pw_end + 1, host_end)); + address.user = unescapeForFileName(std::string(address_begin, has_pw ? colon : user_pw_end)); + address.password = has_pw ? unescapeForFileName(std::string(colon + 1, user_pw_end)) : std::string(); + address.default_database = has_db ? unescapeForFileName(std::string(has_db + 1, address_end)) : std::string(); return address; } diff --git a/dbms/src/Interpreters/Cluster.h b/dbms/src/Interpreters/Cluster.h index b1cbdb22e9a..e1ee1994d65 100644 --- a/dbms/src/Interpreters/Cluster.h +++ b/dbms/src/Interpreters/Cluster.h @@ -57,8 +57,8 @@ public: UInt16 port; String user; String password; - UInt32 shard_number{}; /// shard serial number in configuration file - UInt32 replica_number{}; /// replica serial number in this shard + UInt32 shard_index{}; /// shard serial number in configuration file + UInt32 replica_index{}; /// replica serial number in this shard /// This database is selected when no database is specified for Distributed table String default_database; @@ -70,7 +70,7 @@ public: Protocol::Secure secure = Protocol::Secure::Disable; Address() = default; - Address(const Poco::Util::AbstractConfiguration & config, const String & config_prefix, UInt32 shard_number_ = 0, UInt32 replica_number_ = 0); + Address(const Poco::Util::AbstractConfiguration & config, const String & config_prefix, UInt32 shard_index_ = 0, UInt32 replica_index_ = 0); Address(const String & host_port_, const String & user_, const String & password_, UInt16 clickhouse_port, bool secure_ = false); /// Returns 'escaped_host_name:port' String toString() const; @@ -82,8 +82,10 @@ public: static std::pair fromString(const String & host_port_string); - /// Retrurns escaped shard{shard_number}_replica{replica_number}@resolved_host_address:resolved_host_port#default_database + /// Returns escaped shard{shard_index}_replica{replica_index} String toFullString() const; + + /// Returns address with only shard index and replica index or full address without shard index and replica index static Address fromFullString(const String & address_full_string); /// Returns resolved address if it does resolve. From d05642575d50d9a4ca6d904b03e4110976e7b728 Mon Sep 17 00:00:00 2001 From: millb Date: Fri, 31 Jan 2020 14:16:46 +0300 Subject: [PATCH 008/134] fixed --- dbms/src/Interpreters/Cluster.cpp | 6 ++-- .../Storages/Distributed/DirectoryMonitor.cpp | 36 +++++++++++++++---- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/dbms/src/Interpreters/Cluster.cpp b/dbms/src/Interpreters/Cluster.cpp index d390ce8cbaa..a972fe294d5 100644 --- a/dbms/src/Interpreters/Cluster.cpp +++ b/dbms/src/Interpreters/Cluster.cpp @@ -138,8 +138,8 @@ std::pair Cluster::Address::fromString(const String & host_port_ String Cluster::Address::toFullString() const { return - ((shard_number == 0) ? "" : "shard" + std::to_string(shard_number)) + - ((replica_number == 0) ? "" : "_replica" + std::to_string(replica_number)); + ((shard_index == 0) ? "" : "shard" + std::to_string(shard_index)) + + ((replica_index == 0) ? "" : "_replica" + std::to_string(replica_index)); } Cluster::Address Cluster::Address::fromFullString(const String & full_string) @@ -157,7 +157,7 @@ Cluster::Address Cluster::Address::fromFullString(const String & full_string) const char * user_pw_end = strchr(full_string.data(), '@'); - /// parsing with format [shard{shard_number}[_replica{replica_number}]] + /// parsing with format [shard{shard_index}[_replica{replica_index}]] if (!user_pw_end && startsWith("shard", full_string)) { const char * underscore = strchr(full_string.data(), '_'); diff --git a/dbms/src/Storages/Distributed/DirectoryMonitor.cpp b/dbms/src/Storages/Distributed/DirectoryMonitor.cpp index ea9a659314b..5d4c8d36254 100644 --- a/dbms/src/Storages/Distributed/DirectoryMonitor.cpp +++ b/dbms/src/Storages/Distributed/DirectoryMonitor.cpp @@ -188,21 +188,45 @@ ConnectionPoolPtr StorageDistributedDirectoryMonitor::createPool(const std::stri { const auto & cluster = storage.getCluster(); const auto & shards_info = cluster->getShardsInfo(); - // const auto & shards_addresses = cluster->getShardsInfo(); + const auto & shards_addresses = cluster->getShardsAddresses(); + + /// check format shard{shard_index}_number{number_index} + if (address.shard_index != 0) + { + return shards_info[address.shard_index].per_replica_pools[address.replica_index]; + } /// existing connections pool have a higher priority - return shards_info[address.shard_number].per_replica_pools[address.replica_number]; + for (size_t shard_index = 0; shard_index < shards_info.size(); ++shard_index) + { + const Cluster::Addresses & replicas_addresses = shards_addresses[shard_index]; - /*return std::make_shared( - 1, address.host_name, address.port, address.default_database, address.user, address.password, - storage.getName() + '_' + address.user, Protocol::Compression::Enable, address.secure);*/ + for (size_t replica_index = 0; replica_index < replicas_addresses.size(); ++replica_index) + { + const Cluster::Address & replica_address = replicas_addresses[replica_index]; + + if (address.user == replica_address.user && + address.password == replica_address.password && + address.host_name == replica_address.host_name && + address.port == replica_address.port && + address.default_database == replica_address.default_database && + address.secure == replica_address.secure) + { + return shards_info[shard_index].per_replica_pools[replica_index]; + } + } + } + + return std::make_shared( + 1, address.host_name, address.port, address.default_database, address.user, address.password, + storage.getName() + '_' + address.user, Protocol::Compression::Enable, address.secure); }; auto pools = createPoolsForAddresses(name, pool_factory); const auto settings = storage.global_context.getSettings(); return pools.size() == 1 ? pools.front() : std::make_shared(pools, LoadBalancing::RANDOM, - settings.distributed_replica_error_half_life.totalSeconds(), settings.distributed_replica_error_cap); + settings.distributed_replica_error_half_life.totalSeconds(), settings.distributed_replica_error_cap); } From 5c5b76d2b083194916eb1ffa5182640e187e6b04 Mon Sep 17 00:00:00 2001 From: Mikhail Korotov <55493615+millb@users.noreply.github.com> Date: Fri, 31 Jan 2020 14:28:39 +0300 Subject: [PATCH 009/134] Update DirectoryMonitor.cpp --- dbms/src/Storages/Distributed/DirectoryMonitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbms/src/Storages/Distributed/DirectoryMonitor.cpp b/dbms/src/Storages/Distributed/DirectoryMonitor.cpp index 5d4c8d36254..2ef0d64e73c 100644 --- a/dbms/src/Storages/Distributed/DirectoryMonitor.cpp +++ b/dbms/src/Storages/Distributed/DirectoryMonitor.cpp @@ -226,7 +226,7 @@ ConnectionPoolPtr StorageDistributedDirectoryMonitor::createPool(const std::stri const auto settings = storage.global_context.getSettings(); return pools.size() == 1 ? pools.front() : std::make_shared(pools, LoadBalancing::RANDOM, - settings.distributed_replica_error_half_life.totalSeconds(), settings.distributed_replica_error_cap); + settings.distributed_replica_error_half_life.totalSeconds(), settings.distributed_replica_error_cap); } From 14acdffb0e8432f0164a3e5b2b7dfb505e1bbf0f Mon Sep 17 00:00:00 2001 From: Mikhail Korotov <55493615+millb@users.noreply.github.com> Date: Fri, 31 Jan 2020 14:29:21 +0300 Subject: [PATCH 010/134] Update DirectoryMonitor.cpp --- dbms/src/Storages/Distributed/DirectoryMonitor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dbms/src/Storages/Distributed/DirectoryMonitor.cpp b/dbms/src/Storages/Distributed/DirectoryMonitor.cpp index 2ef0d64e73c..a9ebdb02076 100644 --- a/dbms/src/Storages/Distributed/DirectoryMonitor.cpp +++ b/dbms/src/Storages/Distributed/DirectoryMonitor.cpp @@ -218,8 +218,8 @@ ConnectionPoolPtr StorageDistributedDirectoryMonitor::createPool(const std::stri } return std::make_shared( - 1, address.host_name, address.port, address.default_database, address.user, address.password, - storage.getName() + '_' + address.user, Protocol::Compression::Enable, address.secure); + 1, address.host_name, address.port, address.default_database, address.user, address.password, + storage.getName() + '_' + address.user, Protocol::Compression::Enable, address.secure); }; auto pools = createPoolsForAddresses(name, pool_factory); From 0eca2dd5caa7d0600a2f8ec511cd2deff59cc51b Mon Sep 17 00:00:00 2001 From: Aleksei Levushkin Date: Sun, 2 Feb 2020 16:29:02 +0300 Subject: [PATCH 011/134] added branch to grpc contrib --- .gitmodules | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitmodules b/.gitmodules index 02b1146871b..b4bc3dc33a5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -107,6 +107,7 @@ [submodule "contrib/grpc"] path = contrib/grpc url = https://github.com/grpc/grpc.git + branch = v1.25.0 [submodule "contrib/aws"] path = contrib/aws url = https://github.com/aws/aws-sdk-cpp.git From 439ef6af9a7e455565e7247db8adeb2b10a70521 Mon Sep 17 00:00:00 2001 From: Aleksei Levushkin Date: Sun, 2 Feb 2020 16:36:59 +0300 Subject: [PATCH 012/134] turn off protobuf tests --- contrib/grpc-cmake/CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/contrib/grpc-cmake/CMakeLists.txt b/contrib/grpc-cmake/CMakeLists.txt index cc1c2b52b51..b1941ae508f 100644 --- a/contrib/grpc-cmake/CMakeLists.txt +++ b/contrib/grpc-cmake/CMakeLists.txt @@ -54,9 +54,10 @@ endif() # protobuf.cmake set(PROTOBUF_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../protobuf) -if(NOT protobuf_BUILD_TESTS) - set(protobuf_BUILD_TESTS OFF CACHE BOOL "Build protobuf tests") -endif() +# if(NOT protobuf_BUILD_TESTS) + # set(protobuf_BUILD_TESTS OFF CACHE BOOL "Build protobuf tests") +# endif() +set(protobuf_BUILD_TESTS OFF CACHE BOOL "Build protobuf tests") if(NOT protobuf_WITH_ZLIB) set(protobuf_WITH_ZLIB OFF CACHE BOOL "Build protobuf with zlib.") endif() From e0eb2f542842b3fce5b9d86b6f4a29ed64ed7f1e Mon Sep 17 00:00:00 2001 From: Mikhail Korotov <55493615+millb@users.noreply.github.com> Date: Mon, 3 Feb 2020 16:18:00 +0300 Subject: [PATCH 013/134] Update Cluster.cpp --- dbms/src/Interpreters/Cluster.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbms/src/Interpreters/Cluster.cpp b/dbms/src/Interpreters/Cluster.cpp index a972fe294d5..665ee5af1ed 100644 --- a/dbms/src/Interpreters/Cluster.cpp +++ b/dbms/src/Interpreters/Cluster.cpp @@ -158,7 +158,7 @@ Cluster::Address Cluster::Address::fromFullString(const String & full_string) const char * user_pw_end = strchr(full_string.data(), '@'); /// parsing with format [shard{shard_index}[_replica{replica_index}]] - if (!user_pw_end && startsWith("shard", full_string)) + if (!user_pw_end && startsWith(full_string, "shard")) { const char * underscore = strchr(full_string.data(), '_'); From 663e944b33c0a1dbc8002a53fa6011d0a6dfd2f0 Mon Sep 17 00:00:00 2001 From: millb Date: Mon, 3 Feb 2020 19:03:42 +0300 Subject: [PATCH 014/134] Attempt --- dbms/src/Interpreters/Cluster.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dbms/src/Interpreters/Cluster.cpp b/dbms/src/Interpreters/Cluster.cpp index a972fe294d5..61b28252f8b 100644 --- a/dbms/src/Interpreters/Cluster.cpp +++ b/dbms/src/Interpreters/Cluster.cpp @@ -139,7 +139,8 @@ String Cluster::Address::toFullString() const { return ((shard_index == 0) ? "" : "shard" + std::to_string(shard_index)) + - ((replica_index == 0) ? "" : "_replica" + std::to_string(replica_index)); + ((replica_index == 0) ? "" : "_replica" + std::to_string(replica_index)) + + ((secure == Protocol::Secure::Enable) ? "+secure" : ""); } Cluster::Address Cluster::Address::fromFullString(const String & full_string) From bce3ec2a296cb32abac6b3f10e6e8127f36e9acd Mon Sep 17 00:00:00 2001 From: proller Date: Mon, 3 Feb 2020 19:46:17 +0300 Subject: [PATCH 015/134] Revert "Revert "Build fixes"" This reverts commit 9e0b40bf09e373135758737f4ba31e1f270d8429. --- cmake/find/h3.cmake | 3 +-- cmake/find/zlib.cmake | 2 +- cmake/tools.cmake | 8 +++++--- contrib/CMakeLists.txt | 13 ++++++++----- contrib/replxx-cmake/CMakeLists.txt | 5 ++++- dbms/CMakeLists.txt | 8 ++++++-- dbms/src/Functions/geoToH3.cpp | 6 +++++- dbms/src/Functions/h3EdgeAngle.cpp | 6 +++++- dbms/src/Functions/h3EdgeLengthM.cpp | 9 +++++++-- dbms/src/Functions/h3GetResolution.cpp | 6 +++++- dbms/src/Functions/h3IsValid.cpp | 6 +++++- dbms/src/Functions/h3kRing.cpp | 6 +++++- debian/pbuilder-hooks/B90test-server | 7 ------- 13 files changed, 57 insertions(+), 28 deletions(-) diff --git a/cmake/find/h3.cmake b/cmake/find/h3.cmake index 6abe1ee657c..e01f0269507 100644 --- a/cmake/find/h3.cmake +++ b/cmake/find/h3.cmake @@ -15,9 +15,8 @@ if (USE_INTERNAL_H3_LIBRARY) set (H3_LIBRARY h3) set (H3_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/h3/src/h3lib/include) elseif (NOT MISSING_INTERNAL_H3_LIBRARY) - set (H3_INCLUDE_PATHS /usr/local/include/h3) find_library (H3_LIBRARY h3) - find_path (H3_INCLUDE_DIR NAMES h3api.h PATHS ${H3_INCLUDE_PATHS}) + find_path (H3_INCLUDE_DIR NAMES h3/h3api.h PATHS ${H3_INCLUDE_PATHS}) endif () if (H3_LIBRARY AND H3_INCLUDE_DIR) diff --git a/cmake/find/zlib.cmake b/cmake/find/zlib.cmake index 42cfce871d7..7fc30fbfe42 100644 --- a/cmake/find/zlib.cmake +++ b/cmake/find/zlib.cmake @@ -29,7 +29,7 @@ if (NOT ZLIB_FOUND AND NOT MISSING_INTERNAL_ZLIB_LIBRARY) set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR}) # for poco set (ZLIB_INCLUDE_DIRECTORIES ${ZLIB_INCLUDE_DIR}) # for protobuf set (ZLIB_FOUND 1) # for poco - if (USE_STATIC_LIBRARIES) + if (USE_STATIC_LIBRARIES AND DEFINED BUILD_SHARED_LIBS) set (ZLIB_LIBRARIES zlibstatic CACHE INTERNAL "") else () set (ZLIB_LIBRARIES zlib CACHE INTERNAL "") diff --git a/cmake/tools.cmake b/cmake/tools.cmake index 025aac79b53..6aaeb5b8a16 100644 --- a/cmake/tools.cmake +++ b/cmake/tools.cmake @@ -32,8 +32,9 @@ else () find_program (GOLD_PATH NAMES "ld.gold" "gold") endif () +if (NOT OS_FREEBSD) # We prefer LLD linker over Gold or BFD. -if (NOT LINKER_NAME) + if (NOT LINKER_NAME) if (LLD_PATH) if (COMPILER_GCC) # GCC driver requires one of supported linker names like "lld". @@ -43,9 +44,9 @@ if (NOT LINKER_NAME) set (LINKER_NAME ${LLD_PATH}) endif () endif () -endif () + endif () -if (NOT LINKER_NAME) + if (NOT LINKER_NAME) if (GOLD_PATH) if (COMPILER_GCC) set (LINKER_NAME "gold") @@ -53,6 +54,7 @@ if (NOT LINKER_NAME) set (LINKER_NAME ${GOLD_PATH}) endif () endif () + endif () endif () if (LINKER_NAME) diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt index 999d1e96c9a..8fb4c612ecb 100644 --- a/contrib/CMakeLists.txt +++ b/contrib/CMakeLists.txt @@ -54,7 +54,6 @@ if (USE_INTERNAL_BTRIE_LIBRARY) endif () if (USE_INTERNAL_ZLIB_LIBRARY) - unset (BUILD_SHARED_LIBS CACHE) set (ZLIB_ENABLE_TESTS 0 CACHE INTERNAL "") set (SKIP_INSTALL_ALL 1 CACHE INTERNAL "") set (ZLIB_COMPAT 1 CACHE INTERNAL "") # also enables WITH_GZFILEOP @@ -70,10 +69,14 @@ if (USE_INTERNAL_ZLIB_LIBRARY) add_subdirectory (${INTERNAL_ZLIB_NAME}) # We should use same defines when including zlib.h as used when zlib compiled target_compile_definitions (zlib PUBLIC ZLIB_COMPAT WITH_GZFILEOP) - target_compile_definitions (zlibstatic PUBLIC ZLIB_COMPAT WITH_GZFILEOP) + if (TARGET zlibstatic) + target_compile_definitions (zlibstatic PUBLIC ZLIB_COMPAT WITH_GZFILEOP) + endif () if (ARCH_AMD64 OR ARCH_AARCH64) - target_compile_definitions (zlib PUBLIC X86_64 UNALIGNED_OK) - target_compile_definitions (zlibstatic PUBLIC X86_64 UNALIGNED_OK) + target_compile_definitions (zlib PUBLIC X86_64 UNALIGNED_OK) + if (TARGET zlibstatic) + target_compile_definitions (zlibstatic PUBLIC X86_64 UNALIGNED_OK) + endif () endif () endif () @@ -116,7 +119,7 @@ function(mysql_support) endif() if (USE_INTERNAL_ZLIB_LIBRARY) set(ZLIB_FOUND ON) - set(ZLIB_LIBRARY zlibstatic) + set(ZLIB_LIBRARY ${ZLIB_LIBRARIES}) set(WITH_EXTERNAL_ZLIB ON) endif() add_subdirectory (mariadb-connector-c) diff --git a/contrib/replxx-cmake/CMakeLists.txt b/contrib/replxx-cmake/CMakeLists.txt index 1240eb56b39..cc428d957cf 100644 --- a/contrib/replxx-cmake/CMakeLists.txt +++ b/contrib/replxx-cmake/CMakeLists.txt @@ -45,7 +45,10 @@ if (ENABLE_REPLXX) endif () endif () - target_compile_options(replxx PUBLIC -Wno-documentation) + if (NOT (COMPILER_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9)) + target_compile_options(replxx PUBLIC -Wno-documentation) + endif () + target_compile_definitions(replxx PUBLIC USE_REPLXX=1) message (STATUS "Using replxx") diff --git a/dbms/CMakeLists.txt b/dbms/CMakeLists.txt index eeda7aa6a1f..16c38400ba2 100644 --- a/dbms/CMakeLists.txt +++ b/dbms/CMakeLists.txt @@ -176,8 +176,12 @@ elseif (COMPILER_GCC) add_cxx_compile_options(-Wsizeof-array-argument) # Warn for suspicious length parameters to certain string and memory built-in functions if the argument uses sizeof add_cxx_compile_options(-Wsizeof-pointer-memaccess) - # Warn about overriding virtual functions that are not marked with the override keyword - add_cxx_compile_options(-Wsuggest-override) + + if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 9) + # Warn about overriding virtual functions that are not marked with the override keyword + add_cxx_compile_options(-Wsuggest-override) + endif () + # Warn whenever a switch statement has an index of boolean type and the case values are outside the range of a boolean type add_cxx_compile_options(-Wswitch-bool) # Warn if a self-comparison always evaluates to true or false diff --git a/dbms/src/Functions/geoToH3.cpp b/dbms/src/Functions/geoToH3.cpp index 40c267d8656..7fc00f2ccbe 100644 --- a/dbms/src/Functions/geoToH3.cpp +++ b/dbms/src/Functions/geoToH3.cpp @@ -10,7 +10,11 @@ #include #include -#include +#if __has_include(

) +# include

+#else +# include +#endif namespace DB diff --git a/dbms/src/Functions/h3EdgeAngle.cpp b/dbms/src/Functions/h3EdgeAngle.cpp index 18abc864c3e..130081f50ed 100644 --- a/dbms/src/Functions/h3EdgeAngle.cpp +++ b/dbms/src/Functions/h3EdgeAngle.cpp @@ -7,7 +7,11 @@ # include # include -# include +# if __has_include(

) +# include

+# else +# include +# endif namespace DB diff --git a/dbms/src/Functions/h3EdgeLengthM.cpp b/dbms/src/Functions/h3EdgeLengthM.cpp index d3c0db4b4b5..72cbc98bc65 100644 --- a/dbms/src/Functions/h3EdgeLengthM.cpp +++ b/dbms/src/Functions/h3EdgeLengthM.cpp @@ -8,8 +8,13 @@ # include # include -# include -# include +# if __has_include(

) +# include

+# include

+# else +# include +# include +# endif namespace DB diff --git a/dbms/src/Functions/h3GetResolution.cpp b/dbms/src/Functions/h3GetResolution.cpp index dfa84e8e076..1334c7dab5a 100644 --- a/dbms/src/Functions/h3GetResolution.cpp +++ b/dbms/src/Functions/h3GetResolution.cpp @@ -7,7 +7,11 @@ # include # include -# include +# if __has_include(

) +# include

+# else +# include +# endif namespace DB diff --git a/dbms/src/Functions/h3IsValid.cpp b/dbms/src/Functions/h3IsValid.cpp index 0c4123caf00..26ec272a6ae 100644 --- a/dbms/src/Functions/h3IsValid.cpp +++ b/dbms/src/Functions/h3IsValid.cpp @@ -7,7 +7,11 @@ # include # include -# include +# if __has_include(

) +# include

+# else +# include +# endif namespace DB diff --git a/dbms/src/Functions/h3kRing.cpp b/dbms/src/Functions/h3kRing.cpp index 55571472c16..1b9ae132897 100644 --- a/dbms/src/Functions/h3kRing.cpp +++ b/dbms/src/Functions/h3kRing.cpp @@ -11,7 +11,11 @@ # include # include -# include +# if __has_include(

) +# include

+# else +# include +# endif namespace DB diff --git a/debian/pbuilder-hooks/B90test-server b/debian/pbuilder-hooks/B90test-server index 670b0c15fcc..e36c255f9fc 100755 --- a/debian/pbuilder-hooks/B90test-server +++ b/debian/pbuilder-hooks/B90test-server @@ -8,11 +8,6 @@ PACKAGE_INSTALL=${PACKAGE_INSTALL=1} TEST_PORT_RANDOM=${TEST_PORT_RANDOM=1} if [ "${PACKAGE_INSTALL}" ]; then - #for PKG in $(ls /tmp/buildd/*.deb | sed -e's,.*/,,;s,_.*,,' ); do - # apt-get install -y --force-yes "$PKG" ||: - # apt-get remove -y "$PKG" ||: - #done - dpkg --auto-deconfigure -i /tmp/buildd/*.deb ||: apt install -y -f --allow-downgrades ||: dpkg -l | grep clickhouse ||: @@ -45,8 +40,6 @@ export CLICKHOUSE_PORT_TCP_SECURE=${CLICKHOUSE_PORT_TCP_SECURE:=9440} export CLICKHOUSE_PORT_HTTPS=${CLICKHOUSE_PORT_HTTPS:=8443} if [ "${TEST_CONNECT}" ]; then - sed -i 's/ssl_conf = ssl_sect/#ssl_conf = ssl_sect/g' /etc/ssl/openssl.cnf ||: - [ "${TEST_PORT_RANDOM}" ] && echo "${CLICKHOUSE_PORT_HTTP}${CLICKHOUSE_PORT_TCP}${CLICKHOUSE_PORT_INTERSERVER}" > /etc/clickhouse-server/config.d/port.xml if [ "${TEST_SSL}" ]; then From 2723057e809c6a4cd3085734f4e1b6b2cbac3889 Mon Sep 17 00:00:00 2001 From: Aleksei Levushkin Date: Wed, 5 Feb 2020 14:48:59 +0300 Subject: [PATCH 016/134] added zlib-ng instead zlib --- contrib/grpc-cmake/CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/contrib/grpc-cmake/CMakeLists.txt b/contrib/grpc-cmake/CMakeLists.txt index b1941ae508f..950bcb2b7f6 100644 --- a/contrib/grpc-cmake/CMakeLists.txt +++ b/contrib/grpc-cmake/CMakeLists.txt @@ -15,8 +15,8 @@ endif() set(CMAKE_POSITION_INDEPENDENT_CODE TRUE) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_gRPC_C_CXX_FLAGS}") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_gRPC_C_CXX_FLAGS}") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_gRPC_C_CXX_FLAGS} -w") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_gRPC_C_CXX_FLAGS} -w") set(_gRPC_PROTOBUF_LIBRARY_NAME "libprotobuf") @@ -96,9 +96,9 @@ set(_gRPC_UPB_GRPC_GENERATED_DIR "${GRPC_SOURCE_DIR}/src/core/ext/upb-generated" set(_gRPC_UPB_LIBRARIES upb) # zlib.cmake -set(ZLIB_ROOT_DIR ${GRPC_SOURCE_DIR}/third_party/zlib) +set(ZLIB_ROOT_DIR ${GRPC_SOURCE_DIR}/third_party/zlib-ng) include_directories("${ZLIB_ROOT_DIR}") -add_subdirectory(${ZLIB_ROOT_DIR} ${ZLIB_ROOT_DIR}) +# add_subdirectory(${ZLIB_ROOT_DIR} ${ZLIB_ROOT_DIR}) set(_gRPC_ZLIB_LIBRARIES zlibstatic) set(_gRPC_ZLIB_INCLUDE_DIR "${ZLIB_ROOT_DIR}") @@ -1333,7 +1333,7 @@ add_library(grpc++ ${GRPC_SOURCE_DIR}/src/cpp/codegen/codegen_init.cc ) -target_compile_options(grpc++ PUBLIC -Wno-error=shadow) +target_compile_options(grpc++ PUBLIC -w) target_include_directories(grpc++ PUBLIC ${GRPC_INCLUDE_DIR} @@ -1406,7 +1406,7 @@ add_library(grpc++_unsecure ${GRPC_SOURCE_DIR}/src/cpp/codegen/codegen_init.cc ) -target_compile_options(grpc++_unsecure PUBLIC -Wno-error=shadow) +target_compile_options(grpc++_unsecure PUBLIC -w) target_include_directories(grpc++_unsecure PUBLIC ${GRPC_INCLUDE_DIR} From 487d1ff4912ec036b1c42103b1c15a4e8b630254 Mon Sep 17 00:00:00 2001 From: proller Date: Fri, 7 Feb 2020 00:31:53 +0300 Subject: [PATCH 017/134] Fix system zlib headers usage --- contrib/CMakeLists.txt | 1 + contrib/boost-cmake/CMakeLists.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt index 8fb4c612ecb..9a2d3637943 100644 --- a/contrib/CMakeLists.txt +++ b/contrib/CMakeLists.txt @@ -262,6 +262,7 @@ if (USE_EMBEDDED_COMPILER AND USE_INTERNAL_LLVM_LIBRARY) set (LLVM_ENABLE_PIC 0 CACHE INTERNAL "") set (LLVM_TARGETS_TO_BUILD "X86;AArch64" CACHE STRING "") add_subdirectory (llvm/llvm) + target_include_directories(LLVMSupport SYSTEM BEFORE PRIVATE ${ZLIB_INCLUDE_DIR}) endif () if (USE_INTERNAL_LIBGSASL_LIBRARY) diff --git a/contrib/boost-cmake/CMakeLists.txt b/contrib/boost-cmake/CMakeLists.txt index 54dcd750320..582cc84a552 100644 --- a/contrib/boost-cmake/CMakeLists.txt +++ b/contrib/boost-cmake/CMakeLists.txt @@ -41,4 +41,5 @@ endif() if (USE_INTERNAL_AVRO_LIBRARY) add_boost_lib(iostreams) target_link_libraries(boost_iostreams_internal PUBLIC ${ZLIB_LIBRARIES}) + target_include_directories(boost_iostreams_internal SYSTEM BEFORE PRIVATE ${ZLIB_INCLUDE_DIR}) endif() From ae78c9b6bc1545fc1bd972a19674c6293409db44 Mon Sep 17 00:00:00 2001 From: proller Date: Fri, 7 Feb 2020 02:26:45 +0300 Subject: [PATCH 018/134] Fix zlib includes --- contrib/arrow-cmake/CMakeLists.txt | 1 + contrib/libxml2-cmake/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/arrow-cmake/CMakeLists.txt b/contrib/arrow-cmake/CMakeLists.txt index 1f09bba8d31..20ff5c49eea 100644 --- a/contrib/arrow-cmake/CMakeLists.txt +++ b/contrib/arrow-cmake/CMakeLists.txt @@ -348,6 +348,7 @@ if (ARROW_WITH_ZLIB) endif () if (ARROW_WITH_ZSTD) target_link_libraries(${ARROW_LIBRARY} PRIVATE ${ZSTD_LIBRARY}) + target_include_directories(${ARROW_LIBRARY} SYSTEM BEFORE PRIVATE ${ZLIB_INCLUDE_DIR}) endif () target_include_directories(${ARROW_LIBRARY} PRIVATE SYSTEM ${ORC_INCLUDE_DIR}) diff --git a/contrib/libxml2-cmake/CMakeLists.txt b/contrib/libxml2-cmake/CMakeLists.txt index 71127fb9e35..f0b2135a7c8 100644 --- a/contrib/libxml2-cmake/CMakeLists.txt +++ b/contrib/libxml2-cmake/CMakeLists.txt @@ -59,4 +59,4 @@ endif() target_include_directories(libxml2 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/linux_x86_64/include) target_include_directories(libxml2 PUBLIC ${LIBXML2_SOURCE_DIR}/include) -target_include_directories(libxml2 PRIVATE ${ZLIB_INCLUDE_DIR}/include) +target_include_directories(libxml2 SYSTEM BEFORE PRIVATE ${ZLIB_INCLUDE_DIR}) From 75920565c98452844ee299ee8e2e327e0be0198e Mon Sep 17 00:00:00 2001 From: Alexander Kuzmenkov Date: Fri, 31 Jan 2020 18:45:58 +0300 Subject: [PATCH 019/134] Improve flush performance in SystemLog It started having problems under heavy workloads such as saving all memory allocations to trace_log table. To improve that, stop popping entries one by one from the log queue, and actually stop using the queue completely, because we don't use most of its methods or its backpressure feature. Just keep a vector of messages and flush it to disk periodically. --- dbms/src/Interpreters/SystemLog.h | 225 ++++++++++++++---------------- dbms/src/Interpreters/TextLog.cpp | 11 ++ dbms/src/Interpreters/TextLog.h | 8 +- 3 files changed, 124 insertions(+), 120 deletions(-) diff --git a/dbms/src/Interpreters/SystemLog.h b/dbms/src/Interpreters/SystemLog.h index 301bceba525..8dc1f911da2 100644 --- a/dbms/src/Interpreters/SystemLog.h +++ b/dbms/src/Interpreters/SystemLog.h @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include @@ -53,6 +52,10 @@ namespace DB }; */ +namespace ErrorCodes +{ + extern const int TIMEOUT_EXCEEDED; +} #define DBMS_SYSTEM_LOG_QUEUE_SIZE 1048576 @@ -119,55 +122,45 @@ public: void shutdown(); protected: + Logger * log; + +private: + /* Saving thread data */ Context & context; const String database_name; const String table_name; const String storage_def; StoragePtr table; + bool is_prepared = false; const size_t flush_interval_milliseconds; - std::atomic is_shutdown{false}; - - enum class EntryType - { - LOG_ELEMENT = 0, - AUTO_FLUSH, - FORCE_FLUSH, - SHUTDOWN, - }; - - using QueueItem = std::pair; - - /// Queue is bounded. But its size is quite large to not block in all normal cases. - ConcurrentBoundedQueue queue {DBMS_SYSTEM_LOG_QUEUE_SIZE}; - - /** Data that was pulled from queue. Data is accumulated here before enough time passed. - * It's possible to implement double-buffering, but we assume that insertion into table is faster - * than accumulation of large amount of log records (for example, for query log - processing of large amount of queries). - */ - std::vector data; - - Logger * log; - - /** In this thread, data is pulled from 'queue' and stored in 'data', and then written into table. - */ ThreadFromGlobalPool saving_thread; - void threadFunction(); + /* Data shared between callers of add()/flush()/shutdown(), and the saving thread */ + std::mutex mutex; + /// Queue is bounded. But its size is quite large to not block in all normal cases. + std::vector queue; + // An always-incrementing index of the first message currently in the queue. + // We use it to give a global sequential index to every message, so that we can wait + // until a particular message is flushed. This is used to implement synchronous log + // flushing for SYSTEM FLUSH LOGS. + uint64_t queue_front_index = 0; + bool is_shutdown = false; + std::condition_variable flush_event; + // Requested to flush logs up to this index, exclusive + uint64_t requested_flush_before = 0; + // Flushed log up to this index, exclusive + uint64_t flushed_before = 0; + + void savingThreadFunction(); /** Creates new table if it does not exist. * Renames old table if its structure is not suitable. * This cannot be done in constructor to avoid deadlock while renaming a table under locked Context when SystemLog object is created. */ - bool is_prepared = false; void prepareTable(); - std::mutex flush_mutex; - std::mutex condvar_mutex; - std::condition_variable flush_condvar; - bool force_flushing = false; - /// flushImpl can be executed only in saving_thread. - void flushImpl(EntryType reason); + void flushImpl(const std::vector & to_flush, uint64_t to_flush_end); }; @@ -183,51 +176,86 @@ SystemLog::SystemLog(Context & context_, { log = &Logger::get("SystemLog (" + database_name + "." + table_name + ")"); - data.reserve(DBMS_SYSTEM_LOG_QUEUE_SIZE); - saving_thread = ThreadFromGlobalPool([this] { threadFunction(); }); + saving_thread = ThreadFromGlobalPool([this] { savingThreadFunction(); }); } template void SystemLog::add(const LogElement & element) { + std::unique_lock lock(mutex); + if (is_shutdown) return; - /// Without try we could block here in case of queue overflow. - if (!queue.tryPush({EntryType::LOG_ELEMENT, element})) - LOG_ERROR(log, "SystemLog queue is full"); + if (queue.size() >= DBMS_SYSTEM_LOG_QUEUE_SIZE / 2) + { + // The queue more than half full, time to flush. + const uint64_t queue_end = queue_front_index + queue.size(); + if (requested_flush_before < queue_end) + { + requested_flush_before = queue_end; + } + flush_event.notify_all(); + } + + if (queue.size() >= DBMS_SYSTEM_LOG_QUEUE_SIZE) + { + // TextLog sets its logger level to 0, so this log is a noop and there + // is no recursive logging. + LOG_ERROR(log, "Queue is full for system log '" + demangle(typeid(*this).name()) + "'."); + return; + } + + queue.push_back(element); } template void SystemLog::flush() { + std::unique_lock lock(mutex); + if (is_shutdown) return; - std::lock_guard flush_lock(flush_mutex); - force_flushing = true; + const uint64_t queue_end = queue_front_index + queue.size(); - /// Tell thread to execute extra flush. - queue.push({EntryType::FORCE_FLUSH, {}}); + if (requested_flush_before < queue_end) + { + requested_flush_before = queue_end; + } + flush_event.notify_all(); - /// Wait for flush being finished. - std::unique_lock lock(condvar_mutex); - while (force_flushing) - flush_condvar.wait(lock); + const int timeout_seconds = 60; + bool result = flush_event.wait_for(lock, std::chrono::seconds(timeout_seconds), + [&] { return flushed_before >= queue_end; }); + + if (!result) + { + throw Exception("Timeout exceeded (" + toString(timeout_seconds) + " s) while flushing system log '" + demangle(typeid(*this).name()) + "'.", + ErrorCodes::TIMEOUT_EXCEEDED); + } } template void SystemLog::shutdown() { - bool old_val = false; - if (!is_shutdown.compare_exchange_strong(old_val, true)) - return; + { + std::unique_lock lock(mutex); + + if (is_shutdown) + { + return; + } + + is_shutdown = true; + + /// Tell thread to shutdown. + flush_event.notify_all(); + } - /// Tell thread to shutdown. - queue.push({EntryType::SHUTDOWN, {}}); saving_thread.join(); } @@ -240,71 +268,41 @@ SystemLog::~SystemLog() template -void SystemLog::threadFunction() +void SystemLog::savingThreadFunction() { setThreadName("SystemLogFlush"); - Stopwatch time_after_last_write; - bool first = true; - - while (true) + bool exit_this_thread = false; + while (!exit_this_thread) { try { - if (first) + std::vector to_flush; + // The end index (exclusive, like std end()) of the messages we are + // going to flush. + uint64_t to_flush_end = 0; + { - time_after_last_write.restart(); - first = false; + std::unique_lock lock(mutex); + flush_event.wait_for(lock, std::chrono::milliseconds(flush_interval_milliseconds), + [&] () { return requested_flush_before > flushed_before || is_shutdown; }); + + queue_front_index += queue.size(); + to_flush_end = queue_front_index; + queue.swap(to_flush); + + exit_this_thread = is_shutdown; } - QueueItem element; - bool has_element = false; - - /// data.size() is increased only in this function - /// TODO: get rid of data and queue duality - - if (data.empty()) + if (to_flush.empty()) { - queue.pop(element); - has_element = true; - } - else - { - size_t milliseconds_elapsed = time_after_last_write.elapsed() / 1000000; - if (milliseconds_elapsed < flush_interval_milliseconds) - has_element = queue.tryPop(element, flush_interval_milliseconds - milliseconds_elapsed); + continue; } - if (has_element) - { - if (element.first == EntryType::SHUTDOWN) - { - /// NOTE: MergeTree engine can write data even it is already in shutdown state. - flushImpl(element.first); - break; - } - else if (element.first == EntryType::FORCE_FLUSH) - { - flushImpl(element.first); - time_after_last_write.restart(); - continue; - } - else - data.push_back(element.second); - } - - size_t milliseconds_elapsed = time_after_last_write.elapsed() / 1000000; - if (milliseconds_elapsed >= flush_interval_milliseconds) - { - /// Write data to a table. - flushImpl(EntryType::AUTO_FLUSH); - time_after_last_write.restart(); - } + flushImpl(to_flush, to_flush_end); } catch (...) { - /// In case of exception we lost accumulated data - to avoid locking. - data.clear(); tryLogCurrentException(__PRETTY_FUNCTION__); } } @@ -312,13 +310,10 @@ void SystemLog::threadFunction() template -void SystemLog::flushImpl(EntryType reason) +void SystemLog::flushImpl(const std::vector & to_flush, uint64_t to_flush_end) { try { - if ((reason == EntryType::AUTO_FLUSH || reason == EntryType::SHUTDOWN) && data.empty()) - return; - LOG_TRACE(log, "Flushing system log"); /// We check for existence of the table and create it as needed at every flush. @@ -327,13 +322,9 @@ void SystemLog::flushImpl(EntryType reason) prepareTable(); Block block = LogElement::createBlock(); - for (const LogElement & elem : data) + for (const auto & elem : to_flush) elem.appendToBlock(block); - /// Clear queue early, because insertion to the table could lead to generation of more log entrites - /// and pushing them to already full queue will lead to deadlock. - data.clear(); - /// We write to table indirectly, using InterpreterInsertQuery. /// This is needed to support DEFAULT-columns in table. @@ -352,15 +343,11 @@ void SystemLog::flushImpl(EntryType reason) catch (...) { tryLogCurrentException(__PRETTY_FUNCTION__); - /// In case of exception, also clean accumulated data - to avoid locking. - data.clear(); - } - if (reason == EntryType::FORCE_FLUSH) - { - std::lock_guard lock(condvar_mutex); - force_flushing = false; - flush_condvar.notify_one(); } + + std::unique_lock lock(mutex); + flushed_before = to_flush_end; + flush_event.notify_all(); } diff --git a/dbms/src/Interpreters/TextLog.cpp b/dbms/src/Interpreters/TextLog.cpp index c09877c2df5..b5f1d987b91 100644 --- a/dbms/src/Interpreters/TextLog.cpp +++ b/dbms/src/Interpreters/TextLog.cpp @@ -70,4 +70,15 @@ void TextLogElement::appendToBlock(Block & block) const columns[i++]->insert(source_line); } +TextLog::TextLog(Context & context_, const String & database_name_, + const String & table_name_, const String & storage_def_, + size_t flush_interval_milliseconds_) + : SystemLog(context_, database_name_, table_name_, + storage_def_, flush_interval_milliseconds_) +{ + // SystemLog methods may write text logs, so we disable logging for the text + // log table to avoid recursion. + log->setLevel(0); +} + } diff --git a/dbms/src/Interpreters/TextLog.h b/dbms/src/Interpreters/TextLog.h index fff45f14328..73c38429662 100644 --- a/dbms/src/Interpreters/TextLog.h +++ b/dbms/src/Interpreters/TextLog.h @@ -30,7 +30,13 @@ struct TextLogElement class TextLog : public SystemLog { - using SystemLog::SystemLog; +public: + TextLog( + Context & context_, + const String & database_name_, + const String & table_name_, + const String & storage_def_, + size_t flush_interval_milliseconds_); }; } From b125e6b393f3ca00894795ecffaf22c3bd57a785 Mon Sep 17 00:00:00 2001 From: Alexander Kuzmenkov Date: Thu, 6 Feb 2020 18:07:08 +0300 Subject: [PATCH 020/134] Log which configuration files we loaded. --- dbms/src/Common/Config/ConfigProcessor.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dbms/src/Common/Config/ConfigProcessor.cpp b/dbms/src/Common/Config/ConfigProcessor.cpp index acf58abfbb4..e8e040360a4 100644 --- a/dbms/src/Common/Config/ConfigProcessor.cpp +++ b/dbms/src/Common/Config/ConfigProcessor.cpp @@ -427,8 +427,8 @@ ConfigProcessor::Files ConfigProcessor::getConfigMergeFiles(const std::string & // Skip non-config and temporary files if (file.isFile() && (extension == "xml" || extension == "conf") && !startsWith(base_name, ".")) files.push_back(file.path()); + } } - } std::sort(files.begin(), files.end()); @@ -440,6 +440,8 @@ XMLDocumentPtr ConfigProcessor::processConfig( zkutil::ZooKeeperNodeCache * zk_node_cache, const zkutil::EventPtr & zk_changed_event) { + LOG_DEBUG(log, "Processing configuration file '" + path + "'."); + XMLDocumentPtr config = dom_parser.parse(path); std::vector contributing_files; @@ -449,6 +451,8 @@ XMLDocumentPtr ConfigProcessor::processConfig( { try { + LOG_DEBUG(log, "Merging configuration file '" + merge_file + "'."); + XMLDocumentPtr with = dom_parser.parse(merge_file); merge(config, with); contributing_files.push_back(merge_file); @@ -484,6 +488,8 @@ XMLDocumentPtr ConfigProcessor::processConfig( } if (!include_from_path.empty()) { + LOG_DEBUG(log, "Including configuration file '" + include_from_path + "'."); + contributing_files.push_back(include_from_path); include_from = dom_parser.parse(include_from_path); } @@ -613,6 +619,7 @@ void ConfigProcessor::savePreprocessedConfig(const LoadedConfig & loaded_config, Poco::File(preprocessed_path_parent).createDirectories(); } DOMWriter().writeNode(preprocessed_path, loaded_config.preprocessed_xml); + LOG_DEBUG(log, "Saved preprocessed configuration to '" << preprocessed_path << "'."); } catch (Poco::Exception & e) { From ae0044efe87b2f43d985324455efb69d62605011 Mon Sep 17 00:00:00 2001 From: Alexander Kuzmenkov <36882414+akuzm@users.noreply.github.com> Date: Fri, 7 Feb 2020 22:37:24 +0300 Subject: [PATCH 021/134] Update ConfigProcessor.cpp --- dbms/src/Common/Config/ConfigProcessor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbms/src/Common/Config/ConfigProcessor.cpp b/dbms/src/Common/Config/ConfigProcessor.cpp index e8e040360a4..ce96bb70ddc 100644 --- a/dbms/src/Common/Config/ConfigProcessor.cpp +++ b/dbms/src/Common/Config/ConfigProcessor.cpp @@ -427,8 +427,8 @@ ConfigProcessor::Files ConfigProcessor::getConfigMergeFiles(const std::string & // Skip non-config and temporary files if (file.isFile() && (extension == "xml" || extension == "conf") && !startsWith(base_name, ".")) files.push_back(file.path()); - } } + } std::sort(files.begin(), files.end()); From bddbc956ec3c40b4a076c969c78ebd9a93bb4029 Mon Sep 17 00:00:00 2001 From: alesapin Date: Fri, 7 Feb 2020 23:59:51 +0300 Subject: [PATCH 022/134] Add symlynks for lld, because gcc is not able to find it without 'ld.' prefix. --- docker/packager/binary/Dockerfile | 3 +++ docker/packager/deb/Dockerfile | 3 +++ 2 files changed, 6 insertions(+) diff --git a/docker/packager/binary/Dockerfile b/docker/packager/binary/Dockerfile index 9018afb1153..05e2f2c3b97 100644 --- a/docker/packager/binary/Dockerfile +++ b/docker/packager/binary/Dockerfile @@ -57,6 +57,9 @@ RUN apt-get update -y \ rename \ wget +RUN ln -s /usr/bin/lld-8 /usr/bin/ld.lld +RUN ln -s /usr/bin/lld-8 /usr/bin/ldd + ENV CC=clang-8 ENV CXX=clang++-8 diff --git a/docker/packager/deb/Dockerfile b/docker/packager/deb/Dockerfile index 986768b7a95..dc150e9ba14 100644 --- a/docker/packager/deb/Dockerfile +++ b/docker/packager/deb/Dockerfile @@ -88,6 +88,9 @@ RUN curl -O https://clickhouse-builds.s3.yandex.net/utils/dpkg-deb RUN chmod +x dpkg-deb RUN cp dpkg-deb /usr/bin +RUN ln -s /usr/bin/lld-8 /usr/bin/ld.lld +RUN ln -s /usr/bin/lld-8 /usr/bin/ldd + COPY build.sh / CMD ["/bin/bash", "/build.sh"] From 9d35b8b6ea45ffd54fb255f9c13f0a9064f588aa Mon Sep 17 00:00:00 2001 From: Andrew Onyshchuk Date: Sat, 8 Feb 2020 19:23:09 -0600 Subject: [PATCH 023/134] Use correct implementation for reinterpretAsFixedString --- dbms/src/Functions/FunctionsReinterpret.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbms/src/Functions/FunctionsReinterpret.h b/dbms/src/Functions/FunctionsReinterpret.h index b0eebdee88e..59cdf7bc93d 100644 --- a/dbms/src/Functions/FunctionsReinterpret.h +++ b/dbms/src/Functions/FunctionsReinterpret.h @@ -261,7 +261,7 @@ using FunctionReinterpretAsDate = FunctionReinterpretStringAs; using FunctionReinterpretAsString = FunctionReinterpretAsStringImpl; -using FunctionReinterpretAsFixedString = FunctionReinterpretAsStringImpl; +using FunctionReinterpretAsFixedString = FunctionReinterpretAsFixedStringImpl; } From 2b683f6fc97ef266f2bc7d94dd1ef3569ca45b33 Mon Sep 17 00:00:00 2001 From: Alexander Kuzmenkov <36882414+akuzm@users.noreply.github.com> Date: Sun, 9 Feb 2020 17:15:29 +0300 Subject: [PATCH 024/134] boop --- dbms/src/Interpreters/SystemLog.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbms/src/Interpreters/SystemLog.h b/dbms/src/Interpreters/SystemLog.h index 8dc1f911da2..e80e8bb4878 100644 --- a/dbms/src/Interpreters/SystemLog.h +++ b/dbms/src/Interpreters/SystemLog.h @@ -137,7 +137,7 @@ private: /* Data shared between callers of add()/flush()/shutdown(), and the saving thread */ std::mutex mutex; - /// Queue is bounded. But its size is quite large to not block in all normal cases. + // Queue is bounded. But its size is quite large to not block in all normal cases. std::vector queue; // An always-incrementing index of the first message currently in the queue. // We use it to give a global sequential index to every message, so that we can wait From 954ea60a6aea854dbbe81e22a8f49996fd01bfb0 Mon Sep 17 00:00:00 2001 From: alesapin Date: Mon, 10 Feb 2020 12:05:14 +0300 Subject: [PATCH 025/134] Remove redundant compilers, linkers and libs --- docker/packager/binary/Dockerfile | 15 --------------- docker/packager/deb/Dockerfile | 15 --------------- 2 files changed, 30 deletions(-) diff --git a/docker/packager/binary/Dockerfile b/docker/packager/binary/Dockerfile index 05e2f2c3b97..6d30578f269 100644 --- a/docker/packager/binary/Dockerfile +++ b/docker/packager/binary/Dockerfile @@ -13,7 +13,6 @@ RUN apt-get --allow-unauthenticated update -y \ apt-transport-https \ ca-certificates -RUN echo "deb [trusted=yes] http://apt.llvm.org/bionic/ llvm-toolchain-bionic-7 main" >> /etc/apt/sources.list RUN echo "deb [trusted=yes] http://apt.llvm.org/bionic/ llvm-toolchain-bionic-8 main" >> /etc/apt/sources.list RUN add-apt-repository ppa:ubuntu-toolchain-r/test @@ -24,23 +23,10 @@ RUN apt-get update -y \ cmake \ ccache \ curl \ - gcc-7 \ - g++-7 \ gcc-8 \ g++-8 \ gcc-9 \ g++-9 \ - clang-6.0 \ - lld-6.0 \ - libclang-6.0-dev \ - liblld-6.0-dev \ - llvm-6.0 \ - libllvm6.0 \ - llvm-6.0-dev \ - clang-7 \ - lld-7 \ - libclang-7-dev \ - liblld-7-dev \ clang-8 \ lld-8 \ libclang-8-dev \ @@ -58,7 +44,6 @@ RUN apt-get update -y \ wget RUN ln -s /usr/bin/lld-8 /usr/bin/ld.lld -RUN ln -s /usr/bin/lld-8 /usr/bin/ldd ENV CC=clang-8 ENV CXX=clang++-8 diff --git a/docker/packager/deb/Dockerfile b/docker/packager/deb/Dockerfile index dc150e9ba14..b937d9818ae 100644 --- a/docker/packager/deb/Dockerfile +++ b/docker/packager/deb/Dockerfile @@ -14,30 +14,16 @@ RUN apt-get --allow-unauthenticated update -y \ ca-certificates -RUN echo "deb [trusted=yes] http://apt.llvm.org/bionic/ llvm-toolchain-bionic-7 main" >> /etc/apt/sources.list RUN echo "deb [trusted=yes] http://apt.llvm.org/bionic/ llvm-toolchain-bionic-8 main" >> /etc/apt/sources.list RUN add-apt-repository ppa:ubuntu-toolchain-r/test RUN apt-get --allow-unauthenticated update -y \ && env DEBIAN_FRONTEND=noninteractive \ apt-get --allow-unauthenticated install --yes --no-install-recommends \ - gcc-7 \ - g++-7 \ gcc-8 \ g++-8 \ gcc-9 \ g++-9 \ - clang-6.0 \ - lld-6.0 \ - libclang-6.0-dev \ - liblld-6.0-dev \ - llvm-6.0 \ - libllvm6.0 \ - llvm-6.0-dev \ - clang-7 \ - lld-7 \ - libclang-7-dev \ - liblld-7-dev \ clang-8 \ lld-8 \ libclang-8-dev \ @@ -89,7 +75,6 @@ RUN chmod +x dpkg-deb RUN cp dpkg-deb /usr/bin RUN ln -s /usr/bin/lld-8 /usr/bin/ld.lld -RUN ln -s /usr/bin/lld-8 /usr/bin/ldd COPY build.sh / From d59a9a7dedcd83d69b57e5fc524f3d87c751d8a5 Mon Sep 17 00:00:00 2001 From: Alexander Kuzmenkov Date: Mon, 10 Feb 2020 15:54:03 +0300 Subject: [PATCH 026/134] less flappy --- dbms/tests/performance/general_purpose_hashes_on_UUID.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dbms/tests/performance/general_purpose_hashes_on_UUID.xml b/dbms/tests/performance/general_purpose_hashes_on_UUID.xml index c7fb0a3676b..9dbac4e33cc 100644 --- a/dbms/tests/performance/general_purpose_hashes_on_UUID.xml +++ b/dbms/tests/performance/general_purpose_hashes_on_UUID.xml @@ -41,8 +41,8 @@ table - numbers(1000000) - numbers_mt(10000000) + numbers(10000000) + numbers_mt(100000000) From f9a7a328526e46888de2fe0a2399f70195075c77 Mon Sep 17 00:00:00 2001 From: Alexander Kuzmenkov Date: Mon, 10 Feb 2020 21:38:28 +0300 Subject: [PATCH 027/134] less flappy --- dbms/tests/performance/cpu_synthetic.xml | 98 ++++++++++++------------ 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/dbms/tests/performance/cpu_synthetic.xml b/dbms/tests/performance/cpu_synthetic.xml index 16bef3fd42e..50c9d5b6e6d 100644 --- a/dbms/tests/performance/cpu_synthetic.xml +++ b/dbms/tests/performance/cpu_synthetic.xml @@ -14,7 +14,7 @@ - test.hits + hits_100m_single -SELECT count() FROM test.hits WHERE NOT ignore(cityHash64(SearchPhrase)) SETTINGS max_threads = 1 -SELECT count() FROM test.hits WHERE NOT ignore(cityHash64(SearchPhrase)) +SELECT count() FROM hits_100m_single WHERE NOT ignore(cityHash64(SearchPhrase)) SETTINGS max_threads = 1 +SELECT count() FROM hits_100m_single WHERE NOT ignore(cityHash64(SearchPhrase)) -SELECT count() FROM test.hits WHERE NOT ignore(farmHash64(SearchPhrase)) SETTINGS max_threads = 1 -SELECT count() FROM test.hits WHERE NOT ignore(farmHash64(SearchPhrase)) +SELECT count() FROM hits_100m_single WHERE NOT ignore(farmHash64(SearchPhrase)) SETTINGS max_threads = 1 +SELECT count() FROM hits_100m_single WHERE NOT ignore(farmHash64(SearchPhrase)) -SELECT count() FROM test.hits WHERE NOT ignore(metroHash64(SearchPhrase)) SETTINGS max_threads = 1 -SELECT count() FROM test.hits WHERE NOT ignore(metroHash64(SearchPhrase)) +SELECT count() FROM hits_100m_single WHERE NOT ignore(metroHash64(SearchPhrase)) SETTINGS max_threads = 1 +SELECT count() FROM hits_100m_single WHERE NOT ignore(metroHash64(SearchPhrase)) -SELECT count() FROM test.hits WHERE NOT ignore(sipHash64(SearchPhrase)) SETTINGS max_threads = 1 -SELECT count() FROM test.hits WHERE NOT ignore(sipHash64(SearchPhrase)) +SELECT count() FROM hits_100m_single WHERE NOT ignore(sipHash64(SearchPhrase)) SETTINGS max_threads = 1 +SELECT count() FROM hits_100m_single WHERE NOT ignore(sipHash64(SearchPhrase)) -SELECT count() FROM test.hits WHERE NOT ignore(MD5(SearchPhrase)) SETTINGS max_threads = 1 -SELECT count() FROM test.hits WHERE NOT ignore(MD5(SearchPhrase)) +SELECT count() FROM hits_100m_single WHERE NOT ignore(MD5(SearchPhrase)) SETTINGS max_threads = 1 +SELECT count() FROM hits_100m_single WHERE NOT ignore(MD5(SearchPhrase)) -SELECT count() FROM test.hits WHERE NOT ignore(MD5(URL)) SETTINGS max_threads = 1 -SELECT count() FROM test.hits WHERE NOT ignore(MD5(URL)) +SELECT count() FROM hits_100m_single WHERE NOT ignore(MD5(URL)) SETTINGS max_threads = 1 +SELECT count() FROM hits_100m_single WHERE NOT ignore(MD5(URL)) -SELECT count() FROM test.hits WHERE NOT ignore(cityHash64(URL)) SETTINGS max_threads = 1 -SELECT count() FROM test.hits WHERE NOT ignore(cityHash64(URL)) +SELECT count() FROM hits_100m_single WHERE NOT ignore(cityHash64(URL)) SETTINGS max_threads = 1 +SELECT count() FROM hits_100m_single WHERE NOT ignore(cityHash64(URL)) -SELECT count() FROM test.hits WHERE NOT ignore(sipHash64(URL)) SETTINGS max_threads = 1 -SELECT count() FROM test.hits WHERE NOT ignore(sipHash64(URL)) +SELECT count() FROM hits_100m_single WHERE NOT ignore(sipHash64(URL)) SETTINGS max_threads = 1 +SELECT count() FROM hits_100m_single WHERE NOT ignore(sipHash64(URL)) -SELECT count() FROM test.hits WHERE NOT ignore(cityHash64(PageCharset)) SETTINGS max_threads = 1 -SELECT count() FROM test.hits WHERE NOT ignore(cityHash64(PageCharset)) +SELECT count() FROM hits_100m_single WHERE NOT ignore(cityHash64(PageCharset)) SETTINGS max_threads = 1 +SELECT count() FROM hits_100m_single WHERE NOT ignore(cityHash64(PageCharset)) -SELECT count() FROM test.hits WHERE URL LIKE '%metrika%' SETTINGS max_threads = 1 -SELECT count() FROM test.hits WHERE URL LIKE '%metrika%' +SELECT count() FROM hits_100m_single WHERE URL LIKE '%metrika%' SETTINGS max_threads = 1 +SELECT count() FROM hits_100m_single WHERE URL LIKE '%metrika%' -SELECT count() FROM test.hits WHERE positionCaseInsensitiveUTF8(URL, 'новости') != 0 SETTINGS max_threads = 1 -SELECT count() FROM test.hits WHERE positionCaseInsensitiveUTF8(URL, 'новости') != 0 +SELECT count() FROM hits_100m_single WHERE positionCaseInsensitiveUTF8(URL, 'новости') != 0 SETTINGS max_threads = 1 +SELECT count() FROM hits_100m_single WHERE positionCaseInsensitiveUTF8(URL, 'новости') != 0 -SELECT count() FROM test.hits WHERE match(URL, '^https?://(?:www\\.)?metri[kc]a\\.yandex\\.(?:ru|com|com\\.tr|ua|by|kz)/.+?2014') SETTINGS max_threads = 1 -SELECT count() FROM test.hits WHERE match(URL, '^https?://(?:www\\.)?metri[kc]a\\.yandex\\.(?:ru|com|com\\.tr|ua|by|kz)/.+?2014') +SELECT count() FROM hits_100m_single WHERE match(URL, '^https?://(?:www\\.)?metri[kc]a\\.yandex\\.(?:ru|com|com\\.tr|ua|by|kz)/.+?2014') SETTINGS max_threads = 1 +SELECT count() FROM hits_100m_single WHERE match(URL, '^https?://(?:www\\.)?metri[kc]a\\.yandex\\.(?:ru|com|com\\.tr|ua|by|kz)/.+?2014') -SELECT SearchEngineID, SearchPhrase, RegionID FROM test.hits GROUP BY SearchEngineID, SearchPhrase, RegionID ORDER BY count() DESC LIMIT 10 SETTINGS max_threads = 1 -SELECT SearchEngineID, SearchPhrase, RegionID FROM test.hits GROUP BY SearchEngineID, SearchPhrase, RegionID ORDER BY count() DESC LIMIT 10 +SELECT SearchEngineID, SearchPhrase, RegionID FROM hits_100m_single GROUP BY SearchEngineID, SearchPhrase, RegionID ORDER BY count() DESC LIMIT 10 SETTINGS max_threads = 1 +SELECT SearchEngineID, SearchPhrase, RegionID FROM hits_100m_single GROUP BY SearchEngineID, SearchPhrase, RegionID ORDER BY count() DESC LIMIT 10 -SELECT count() FROM test.hits WHERE NOT ignore(toMonday(EventTime)) SETTINGS max_threads = 1 -SELECT count() FROM test.hits WHERE NOT ignore(toMonday(EventTime)) +SELECT count() FROM hits_100m_single WHERE NOT ignore(toMonday(EventTime)) SETTINGS max_threads = 1 +SELECT count() FROM hits_100m_single WHERE NOT ignore(toMonday(EventTime)) -SELECT count() FROM test.hits WHERE NOT ignore(cutQueryString(URL)) SETTINGS max_threads = 1 -SELECT count() FROM test.hits WHERE NOT ignore(cutQueryString(URL)) +SELECT count() FROM hits_100m_single WHERE NOT ignore(cutQueryString(URL)) SETTINGS max_threads = 1 +SELECT count() FROM hits_100m_single WHERE NOT ignore(cutQueryString(URL)) -SELECT quantilesIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM test.hits SETTINGS max_threads = 1 -SELECT quantilesIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM test.hits +SELECT quantilesIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM hits_100m_single SETTINGS max_threads = 1 +SELECT quantilesIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM hits_100m_single -SELECT quantilesTimingIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM test.hits SETTINGS max_threads = 1 -SELECT quantilesTimingIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM test.hits +SELECT quantilesTimingIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM hits_100m_single SETTINGS max_threads = 1 +SELECT quantilesTimingIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM hits_100m_single -SELECT quantilesExactIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM test.hits SETTINGS max_threads = 1 -SELECT quantilesExactIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM test.hits +SELECT quantilesExactIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM hits_100m_single SETTINGS max_threads = 1 +SELECT quantilesExactIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM hits_100m_single -SELECT quantilesTDigestIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM test.hits SETTINGS max_threads = 1 -SELECT quantilesTDigestIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM test.hits +SELECT quantilesTDigestIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM hits_100m_single SETTINGS max_threads = 1 +SELECT quantilesTDigestIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM hits_100m_single -SELECT uniq(UserID) FROM test.hits SETTINGS max_threads = 1 -SELECT uniq(UserID) FROM test.hits +SELECT uniq(UserID) FROM hits_100m_single SETTINGS max_threads = 1 +SELECT uniq(UserID) FROM hits_100m_single -SELECT uniqCombined(17)(UserID) FROM test.hits SETTINGS max_threads = 1 -SELECT uniqCombined(17)(UserID) FROM test.hits +SELECT uniqCombined(17)(UserID) FROM hits_100m_single SETTINGS max_threads = 1 +SELECT uniqCombined(17)(UserID) FROM hits_100m_single -SELECT uniqExact(UserID) FROM test.hits SETTINGS max_threads = 1 -SELECT uniqExact(UserID) FROM test.hits +SELECT uniqExact(UserID) FROM hits_100m_single SETTINGS max_threads = 1 +SELECT uniqExact(UserID) FROM hits_100m_single -SELECT RegionID, uniq(UserID) FROM test.hits GROUP BY RegionID SETTINGS max_threads = 1 -SELECT RegionID, uniq(UserID) FROM test.hits GROUP BY RegionID +SELECT RegionID, uniq(UserID) FROM hits_100m_single GROUP BY RegionID SETTINGS max_threads = 1 +SELECT RegionID, uniq(UserID) FROM hits_100m_single GROUP BY RegionID -SELECT count() FROM test.hits WHERE NOT ignore(*) SETTINGS max_threads = 1 -SELECT count() FROM test.hits WHERE NOT ignore(*) +SELECT count() FROM hits_100m_single WHERE NOT ignore(*) SETTINGS max_threads = 1 +SELECT count() FROM hits_100m_single WHERE NOT ignore(*) From 5dcca60d98bb5d3e75c6b26348e36f5a0210d37a Mon Sep 17 00:00:00 2001 From: Alexander Kuzmenkov <36882414+akuzm@users.noreply.github.com> Date: Tue, 11 Feb 2020 22:18:40 +0300 Subject: [PATCH 028/134] Update general_purpose_hashes_on_UUID.xml --- dbms/tests/performance/general_purpose_hashes_on_UUID.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dbms/tests/performance/general_purpose_hashes_on_UUID.xml b/dbms/tests/performance/general_purpose_hashes_on_UUID.xml index 9dbac4e33cc..71a9002ee9c 100644 --- a/dbms/tests/performance/general_purpose_hashes_on_UUID.xml +++ b/dbms/tests/performance/general_purpose_hashes_on_UUID.xml @@ -41,8 +41,8 @@ table - numbers(10000000) - numbers_mt(100000000) + numbers(20000000) + numbers_mt(200000000) From f88bf5595c0a66a3b7b06e94213c15ff76a2c2c3 Mon Sep 17 00:00:00 2001 From: Alexander Kuzmenkov <36882414+akuzm@users.noreply.github.com> Date: Tue, 11 Feb 2020 22:21:08 +0300 Subject: [PATCH 029/134] Update cpu_synthetic.xml --- dbms/tests/performance/cpu_synthetic.xml | 47 ++++++++++++------------ 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/dbms/tests/performance/cpu_synthetic.xml b/dbms/tests/performance/cpu_synthetic.xml index 50c9d5b6e6d..465c1eb4011 100644 --- a/dbms/tests/performance/cpu_synthetic.xml +++ b/dbms/tests/performance/cpu_synthetic.xml @@ -15,6 +15,7 @@ hits_100m_single + hits_10m_single -SELECT count() FROM hits_100m_single WHERE NOT ignore(cityHash64(SearchPhrase)) SETTINGS max_threads = 1 +SELECT count() FROM hits_10m_single WHERE NOT ignore(cityHash64(SearchPhrase)) SETTINGS max_threads = 1 SELECT count() FROM hits_100m_single WHERE NOT ignore(cityHash64(SearchPhrase)) -SELECT count() FROM hits_100m_single WHERE NOT ignore(farmHash64(SearchPhrase)) SETTINGS max_threads = 1 +SELECT count() FROM hits_10m_single WHERE NOT ignore(farmHash64(SearchPhrase)) SETTINGS max_threads = 1 SELECT count() FROM hits_100m_single WHERE NOT ignore(farmHash64(SearchPhrase)) -SELECT count() FROM hits_100m_single WHERE NOT ignore(metroHash64(SearchPhrase)) SETTINGS max_threads = 1 +SELECT count() FROM hits_10m_single WHERE NOT ignore(metroHash64(SearchPhrase)) SETTINGS max_threads = 1 SELECT count() FROM hits_100m_single WHERE NOT ignore(metroHash64(SearchPhrase)) -SELECT count() FROM hits_100m_single WHERE NOT ignore(sipHash64(SearchPhrase)) SETTINGS max_threads = 1 +SELECT count() FROM hits_10m_single WHERE NOT ignore(sipHash64(SearchPhrase)) SETTINGS max_threads = 1 SELECT count() FROM hits_100m_single WHERE NOT ignore(sipHash64(SearchPhrase)) -SELECT count() FROM hits_100m_single WHERE NOT ignore(MD5(SearchPhrase)) SETTINGS max_threads = 1 +SELECT count() FROM hits_10m_single WHERE NOT ignore(MD5(SearchPhrase)) SETTINGS max_threads = 1 SELECT count() FROM hits_100m_single WHERE NOT ignore(MD5(SearchPhrase)) -SELECT count() FROM hits_100m_single WHERE NOT ignore(MD5(URL)) SETTINGS max_threads = 1 +SELECT count() FROM hits_10m_single WHERE NOT ignore(MD5(URL)) SETTINGS max_threads = 1 SELECT count() FROM hits_100m_single WHERE NOT ignore(MD5(URL)) -SELECT count() FROM hits_100m_single WHERE NOT ignore(cityHash64(URL)) SETTINGS max_threads = 1 +SELECT count() FROM hits_10m_single WHERE NOT ignore(cityHash64(URL)) SETTINGS max_threads = 1 SELECT count() FROM hits_100m_single WHERE NOT ignore(cityHash64(URL)) -SELECT count() FROM hits_100m_single WHERE NOT ignore(sipHash64(URL)) SETTINGS max_threads = 1 +SELECT count() FROM hits_10m_single WHERE NOT ignore(sipHash64(URL)) SETTINGS max_threads = 1 SELECT count() FROM hits_100m_single WHERE NOT ignore(sipHash64(URL)) -SELECT count() FROM hits_100m_single WHERE NOT ignore(cityHash64(PageCharset)) SETTINGS max_threads = 1 +SELECT count() FROM hits_10m_single WHERE NOT ignore(cityHash64(PageCharset)) SETTINGS max_threads = 1 SELECT count() FROM hits_100m_single WHERE NOT ignore(cityHash64(PageCharset)) -SELECT count() FROM hits_100m_single WHERE URL LIKE '%metrika%' SETTINGS max_threads = 1 +SELECT count() FROM hits_10m_single WHERE URL LIKE '%metrika%' SETTINGS max_threads = 1 SELECT count() FROM hits_100m_single WHERE URL LIKE '%metrika%' -SELECT count() FROM hits_100m_single WHERE positionCaseInsensitiveUTF8(URL, 'новости') != 0 SETTINGS max_threads = 1 +SELECT count() FROM hits_10m_single WHERE positionCaseInsensitiveUTF8(URL, 'новости') != 0 SETTINGS max_threads = 1 SELECT count() FROM hits_100m_single WHERE positionCaseInsensitiveUTF8(URL, 'новости') != 0 -SELECT count() FROM hits_100m_single WHERE match(URL, '^https?://(?:www\\.)?metri[kc]a\\.yandex\\.(?:ru|com|com\\.tr|ua|by|kz)/.+?2014') SETTINGS max_threads = 1 +SELECT count() FROM hits_10m_single WHERE match(URL, '^https?://(?:www\\.)?metri[kc]a\\.yandex\\.(?:ru|com|com\\.tr|ua|by|kz)/.+?2014') SETTINGS max_threads = 1 SELECT count() FROM hits_100m_single WHERE match(URL, '^https?://(?:www\\.)?metri[kc]a\\.yandex\\.(?:ru|com|com\\.tr|ua|by|kz)/.+?2014') SELECT SearchEngineID, SearchPhrase, RegionID FROM hits_100m_single GROUP BY SearchEngineID, SearchPhrase, RegionID ORDER BY count() DESC LIMIT 10 SETTINGS max_threads = 1 SELECT SearchEngineID, SearchPhrase, RegionID FROM hits_100m_single GROUP BY SearchEngineID, SearchPhrase, RegionID ORDER BY count() DESC LIMIT 10 -SELECT count() FROM hits_100m_single WHERE NOT ignore(toMonday(EventTime)) SETTINGS max_threads = 1 +SELECT count() FROM hits_10m_single WHERE NOT ignore(toMonday(EventTime)) SETTINGS max_threads = 1 SELECT count() FROM hits_100m_single WHERE NOT ignore(toMonday(EventTime)) -SELECT count() FROM hits_100m_single WHERE NOT ignore(cutQueryString(URL)) SETTINGS max_threads = 1 +SELECT count() FROM hits_10m_single WHERE NOT ignore(cutQueryString(URL)) SETTINGS max_threads = 1 SELECT count() FROM hits_100m_single WHERE NOT ignore(cutQueryString(URL)) -SELECT quantilesIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM hits_100m_single SETTINGS max_threads = 1 +SELECT quantilesIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM hits_10m_single SETTINGS max_threads = 1 SELECT quantilesIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM hits_100m_single -SELECT quantilesTimingIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM hits_100m_single SETTINGS max_threads = 1 +SELECT quantilesTimingIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM hits_10m_single SETTINGS max_threads = 1 SELECT quantilesTimingIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM hits_100m_single -SELECT quantilesExactIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM hits_100m_single SETTINGS max_threads = 1 +SELECT quantilesExactIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM hits_10m_single SETTINGS max_threads = 1 SELECT quantilesExactIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM hits_100m_single -SELECT quantilesTDigestIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM hits_100m_single SETTINGS max_threads = 1 +SELECT quantilesTDigestIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM hits_10m_single SETTINGS max_threads = 1 SELECT quantilesTDigestIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM hits_100m_single -SELECT uniq(UserID) FROM hits_100m_single SETTINGS max_threads = 1 +SELECT uniq(UserID) FROM hits_10m_single SETTINGS max_threads = 1 SELECT uniq(UserID) FROM hits_100m_single -SELECT uniqCombined(17)(UserID) FROM hits_100m_single SETTINGS max_threads = 1 +SELECT uniqCombined(17)(UserID) FROM hits_10m_single SETTINGS max_threads = 1 SELECT uniqCombined(17)(UserID) FROM hits_100m_single -SELECT uniqExact(UserID) FROM hits_100m_single SETTINGS max_threads = 1 +SELECT uniqExact(UserID) FROM hits_10m_single SETTINGS max_threads = 1 SELECT uniqExact(UserID) FROM hits_100m_single -SELECT RegionID, uniq(UserID) FROM hits_100m_single GROUP BY RegionID SETTINGS max_threads = 1 +SELECT RegionID, uniq(UserID) FROM hits_10m_single GROUP BY RegionID SETTINGS max_threads = 1 SELECT RegionID, uniq(UserID) FROM hits_100m_single GROUP BY RegionID -SELECT count() FROM hits_100m_single WHERE NOT ignore(*) SETTINGS max_threads = 1 +SELECT count() FROM hits_10m_single WHERE NOT ignore(*) SETTINGS max_threads = 1 SELECT count() FROM hits_100m_single WHERE NOT ignore(*) From 92fc1a9b2b7749c0b70db45793b70af1699f18eb Mon Sep 17 00:00:00 2001 From: millb Date: Wed, 12 Feb 2020 13:06:09 +0300 Subject: [PATCH 030/134] fixed bugs --- dbms/src/Storages/Distributed/DirectoryMonitor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dbms/src/Storages/Distributed/DirectoryMonitor.cpp b/dbms/src/Storages/Distributed/DirectoryMonitor.cpp index a9ebdb02076..77467da511e 100644 --- a/dbms/src/Storages/Distributed/DirectoryMonitor.cpp +++ b/dbms/src/Storages/Distributed/DirectoryMonitor.cpp @@ -190,10 +190,10 @@ ConnectionPoolPtr StorageDistributedDirectoryMonitor::createPool(const std::stri const auto & shards_info = cluster->getShardsInfo(); const auto & shards_addresses = cluster->getShardsAddresses(); - /// check format shard{shard_index}_number{number_index} + /// check new format shard{shard_index}_number{number_index} if (address.shard_index != 0) { - return shards_info[address.shard_index].per_replica_pools[address.replica_index]; + return shards_info[address.shard_index - 1].per_replica_pools[address.replica_index - 1]; } /// existing connections pool have a higher priority From 6abeabc1f2503817c167c12a77ef37116584994c Mon Sep 17 00:00:00 2001 From: millb Date: Wed, 12 Feb 2020 13:13:11 +0300 Subject: [PATCH 031/134] fixed bugs --- dbms/src/Interpreters/Cluster.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/dbms/src/Interpreters/Cluster.cpp b/dbms/src/Interpreters/Cluster.cpp index b57d2ab5b50..b569a5eed81 100644 --- a/dbms/src/Interpreters/Cluster.cpp +++ b/dbms/src/Interpreters/Cluster.cpp @@ -139,8 +139,7 @@ String Cluster::Address::toFullString() const { return ((shard_index == 0) ? "" : "shard" + std::to_string(shard_index)) + - ((replica_index == 0) ? "" : "_replica" + std::to_string(replica_index)) + - ((secure == Protocol::Secure::Enable) ? "+secure" : ""); + ((replica_index == 0) ? "" : "_replica" + std::to_string(replica_index)); } Cluster::Address Cluster::Address::fromFullString(const String & full_string) @@ -148,17 +147,9 @@ Cluster::Address Cluster::Address::fromFullString(const String & full_string) const char * address_begin = full_string.data(); const char * address_end = address_begin + full_string.size(); - Protocol::Secure secure = Protocol::Secure::Disable; - const char * secure_tag = "+secure"; - if (endsWith(full_string, secure_tag)) - { - address_end -= strlen(secure_tag); - secure = Protocol::Secure::Enable; - } - const char * user_pw_end = strchr(full_string.data(), '@'); - /// parsing with format [shard{shard_index}[_replica{replica_index}]] + /// parsing with [shard{shard_index}[_replica{replica_index}]] format if (!user_pw_end && startsWith(full_string, "shard")) { const char * underscore = strchr(full_string.data(), '_'); @@ -169,6 +160,15 @@ Cluster::Address Cluster::Address::fromFullString(const String & full_string) return address; } + /// parsing with old user[:password]@host:port#default_database format + Protocol::Secure secure = Protocol::Secure::Disable; + const char * secure_tag = "+secure"; + if (endsWith(full_string, secure_tag)) + { + address_end -= strlen(secure_tag); + secure = Protocol::Secure::Enable; + } + const char * colon = strchr(full_string.data(), ':'); if (!user_pw_end || !colon) throw Exception("Incorrect user[:password]@host:port#default_database format " + full_string, ErrorCodes::SYNTAX_ERROR); From e5b048ab51d25ac4a0e7d14200e037f51bbc2002 Mon Sep 17 00:00:00 2001 From: Guillaume Tassery Date: Wed, 12 Feb 2020 11:33:43 +0100 Subject: [PATCH 032/134] Can use bit(And|Or|Xor) using a bitset set as a FixedString --- dbms/src/Functions/FunctionBinaryArithmetic.h | 497 ++++++++++++------ dbms/src/Functions/bitAnd.cpp | 2 +- dbms/src/Functions/bitOr.cpp | 2 +- dbms/src/Functions/bitXor.cpp | 2 +- 4 files changed, 328 insertions(+), 175 deletions(-) diff --git a/dbms/src/Functions/FunctionBinaryArithmetic.h b/dbms/src/Functions/FunctionBinaryArithmetic.h index 4afec074f56..c18516decc6 100644 --- a/dbms/src/Functions/FunctionBinaryArithmetic.h +++ b/dbms/src/Functions/FunctionBinaryArithmetic.h @@ -12,10 +12,12 @@ #include #include #include +#include #include #include #include #include +#include #include #include #include "IFunctionImpl.h" @@ -87,6 +89,33 @@ struct BinaryOperationImplBase } }; +template +struct FixedStringOperationImpl +{ + static void NO_INLINE vector_vector(const ColumnFixedString::Chars & a, const ColumnFixedString::Chars & b, ColumnFixedString::Chars & c) + { + size_t size = a.size(); + for (size_t i = 0; i < size; ++i) + c[i] = Op::template apply(a[i], b[i]); + } + + static void NO_INLINE vector_constant(const ColumnFixedString::Chars & a, const ColumnFixedString::Chars & b, ColumnFixedString::Chars & c) + { + size_t size = a.size(); + for (size_t i = 0; i < size; ++i) + c[i] = Op::template apply(a[i], b[i % b.size()]); + } + + static void NO_INLINE constant_vector(const ColumnFixedString::Chars & a, const ColumnFixedString::Chars & b, ColumnFixedString::Chars & c) + { + size_t size = b.size(); + for (size_t i = 0; i < size; ++i) + c[i] = Op::template apply(a[i % a.size()], b[i]); + } +}; + + + template struct BinaryOperationImpl : BinaryOperationImplBase { @@ -439,7 +468,7 @@ public: }; -template