ClickHouse/src/Storages/System
何李夫 e4c8c4cecf
Add zookeeper name in endpoint id (#49780)
* Add zookeeper name in endpoint id

When we migrate a replicated table from one zookeeper cluster to
another (the reason why we migration is that zookeeper's load is
too high), we will create a new table with the same zpath, but it
will fail and the old table will be in trouble.

Here is some infomation:
1.old table:
  CREATE TABLE a1 (`id` UInt64)
  ENGINE = ReplicatedMergeTree('/clickhouse/tables/default/a1/{shard}', '{replica}')
  ORDER BY (id);
2.new table:
  CREATE TABLE a2 (`id` UInt64)
  ENGINE = ReplicatedMergeTree('aux1:/clickhouse/tables/default/a1/{shard}', '{replica}')
  ORDER BY (id);
3.error info:
  <Error> executeQuery: Code: 220. DB::Exception: Duplicate interserver IO endpoint:
          DataPartsExchange:/clickhouse/tables/default/a1/01/replicas/02.
          (DUPLICATE_INTERSERVER_IO_ENDPOINT)
  <Error> InterserverIOHTTPHandler: Code: 221. DB::Exception: No interserver IO endpoint
          named DataPartsExchange:/clickhouse/tables/default/a1/01/replicas/02.
          (NO_SUCH_INTERSERVER_IO_ENDPOINT)

* Revert "Add zookeeper name in endpoint id"

This reverts commit 9deb75b249619b7abdd38e3949ca8b3a76c9df8e.

* Add zookeeper name in endpoint id

When we migrate a replicated table from one zookeeper cluster to
another (the reason why we migration is that zookeeper's load is
too high), we will create a new table with the same zpath, but it
will fail and the old table will be in trouble.

* Fix incompatible with a new setting

* add a test, fix other issues

* Update 02442_auxiliary_zookeeper_endpoint_id.sql

* Update 02735_system_zookeeper_connection.reference

* Update 02735_system_zookeeper_connection.sql

* Update run.sh

* Remove the 'no-fasttest' tag

* Update 02442_auxiliary_zookeeper_endpoint_id.sql

---------

Co-authored-by: Alexander Tokmakov <tavplubix@clickhouse.com>
Co-authored-by: Alexander Tokmakov <tavplubix@gmail.com>
2023-05-25 12:50:14 +03:00
..
InformationSchema Update columns.sql 2022-11-14 02:42:30 +03:00
attachInformationSchemaTables.cpp fix show create for information_schema 2022-03-21 17:01:39 +01:00
attachInformationSchemaTables.h Merging #24866 (#28691) 2021-09-09 12:37:51 +03:00
attachSystemTables.cpp New system table zookeeper connection (#45245) 2023-05-19 17:06:43 +03:00
attachSystemTables.h Drop support for DatabaseOrdinary in MaterializedMySQL 2021-11-18 11:46:51 +01:00
attachSystemTablesImpl.h make code less bad 2022-06-22 18:31:42 +02:00
CMakeLists.txt Consolidate config_formats.h into config.h 2022-09-28 12:59:05 +00:00
IStorageSystemOneBlock.h Fixes for -Wshorten-64-to-32 2022-10-21 13:25:19 +02:00
StorageSystemAggregateFunctionCombinators.cpp Fix combinators with common prefix name (State and SimpleState) with libstdc++ 2021-04-11 22:10:02 +03:00
StorageSystemAggregateFunctionCombinators.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemAsynchronousInserts.cpp Simplify AsynchronousInsertQueue and fix race (#43233) 2022-11-25 15:02:22 +01:00
StorageSystemAsynchronousInserts.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemAsynchronousMetrics.cpp Merge branch 'master' into keeper-prometheus 2022-11-15 12:00:02 +00:00
StorageSystemAsynchronousMetrics.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemBackups.cpp Improve file includes 2023-03-24 03:44:52 +01:00
StorageSystemBackups.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemBuildOptions.cpp Remove cruft 2021-10-28 02:10:39 +03:00
StorageSystemBuildOptions.cpp.in Fix build with -DENABLE_LIBURING=0 (or -DENABLE_LIBRARIES=0) 2023-02-06 16:57:42 +00:00
StorageSystemBuildOptions.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemCertificates.cpp Use forward declaration of ThreadPool 2023-04-07 11:25:35 +02:00
StorageSystemCertificates.h some refactoring 2022-05-14 17:40:50 -04:00
StorageSystemClusters.cpp Merge branch 'master' into clusters_is_active_column 2023-04-24 15:54:03 +02:00
StorageSystemClusters.h add some columns to system.clusters 2023-04-07 18:26:23 +02:00
StorageSystemCollations.cpp Replace all Context references with std::weak_ptr (#22297) 2021-04-11 02:33:54 +03:00
StorageSystemCollations.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemColumns.cpp Fixes for -Wshorten-64-to-32 2022-10-21 13:25:19 +02:00
StorageSystemColumns.h Fixes for -Wshorten-64-to-32 2022-10-21 13:25:19 +02:00
StorageSystemContributors.cpp Replace all Context references with std::weak_ptr (#22297) 2021-04-11 02:33:54 +03:00
StorageSystemContributors.generated.cpp Update autogenerated version to 23.5.1.1 and contributors 2023-04-27 01:40:57 +02:00
StorageSystemContributors.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemContributors.sh Deprecate sh script for StorageSystemContributors, update generated file 2022-02-16 12:16:43 +01:00
StorageSystemCurrentRoles.cpp better code 2022-06-01 16:49:26 +02:00
StorageSystemCurrentRoles.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemDatabases.cpp Update src/Storages/System/StorageSystemDatabases.cpp 2023-03-15 16:38:59 +03:00
StorageSystemDatabases.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemDataSkippingIndices.cpp Just in case 2022-11-26 01:02:29 +03:00
StorageSystemDataSkippingIndices.h Fixes for -Wshorten-64-to-32 2022-10-21 13:25:19 +02:00
StorageSystemDataTypeFamilies.cpp Replace all Context references with std::weak_ptr (#22297) 2021-04-11 02:33:54 +03:00
StorageSystemDataTypeFamilies.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemDDLWorkerQueue.cpp Update StorageSystemDDLWorkerQueue.cpp 2022-09-14 20:38:50 +03:00
StorageSystemDDLWorkerQueue.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemDetachedParts.cpp Speedup outdated parts loading (#49317) 2023-05-03 18:56:45 +02:00
StorageSystemDetachedParts.h Fixes for -Wshorten-64-to-32 2022-10-21 13:25:19 +02:00
StorageSystemDictionaries.cpp Fix review notes 2023-01-19 17:02:57 +03:00
StorageSystemDictionaries.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemDisks.cpp Simplify FileCacheFactory 2023-04-15 16:15:20 +02:00
StorageSystemDisks.h Fixes for -Wshorten-64-to-32 2022-10-21 13:25:19 +02:00
StorageSystemDistributionQueue.cpp Improve file includes 2023-03-24 03:44:52 +01:00
StorageSystemDistributionQueue.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemDroppedTables.cpp Merge remote-tracking branch 'origin/master' into optimize-compilation 2023-04-13 16:04:09 +02:00
StorageSystemDroppedTables.h rename marked_dropped_tables to dropped_tables 2023-03-27 13:23:56 +02:00
StorageSystemEnabledRoles.cpp better code 2022-06-01 16:49:26 +02:00
StorageSystemEnabledRoles.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemErrors.cpp Fixes for -Wshorten-64-to-32 2022-10-21 13:25:19 +02:00
StorageSystemErrors.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemEvents.cpp Use StrongTypedef for ProfileEvents 2023-04-01 16:01:33 +02:00
StorageSystemEvents.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemFilesystemCache.cpp Merge remote-tracking branch 'upstream/master' into cache-better-locks 2023-04-17 18:22:21 +02:00
StorageSystemFilesystemCache.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemFormats.cpp Better 2023-04-17 04:58:32 +00:00
StorageSystemFormats.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemFunctions.cpp Introduce more fields for in-source function documentation 2023-05-05 21:30:21 +00:00
StorageSystemFunctions.h Implement storing UDF in backups. 2022-06-30 08:37:17 +02:00
StorageSystemGrants.cpp Two ways to provide access to system.users: "GRANT SHOW USERS ON *.*" and "GRANT SELECT ON system.users" 2022-07-15 15:44:29 +02:00
StorageSystemGrants.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemGraphite.cpp Activate clang-tidy warning "readability-container-contains" 2022-04-18 23:53:11 +02:00
StorageSystemGraphite.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemLicenses.cpp Replace all Context references with std::weak_ptr (#22297) 2021-04-11 02:33:54 +03:00
StorageSystemLicenses.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemLicenses.sh
StorageSystemMacros.cpp Replace all Context references with std::weak_ptr (#22297) 2021-04-11 02:33:54 +03:00
StorageSystemMacros.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemMerges.cpp Enhancements for background merges (#49313) 2023-05-02 13:43:59 +02:00
StorageSystemMerges.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemMergeTreeMetadataCache.cpp Better formatting for exception messages (#45449) 2023-01-24 00:13:58 +03:00
StorageSystemMergeTreeMetadataCache.h Consolidate config_core.h into config.h 2022-09-28 13:31:57 +00:00
StorageSystemMergeTreeSettings.cpp fix checks on CREATE + added resolveSetting.h + improved system table 2022-12-06 19:09:18 +00:00
StorageSystemMergeTreeSettings.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemMetrics.cpp Replace all Context references with std::weak_ptr (#22297) 2021-04-11 02:33:54 +03:00
StorageSystemMetrics.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemModels.cpp chore: restore SYSTEM RELOAD MODEL(S) and moniting view SYSTEM.MODELS 2022-09-12 19:33:02 +00:00
StorageSystemModels.h chore: restore SYSTEM RELOAD MODEL(S) and moniting view SYSTEM.MODELS 2022-09-12 19:33:02 +00:00
StorageSystemMoves.cpp fix column name 2022-11-21 16:16:53 +00:00
StorageSystemMoves.h Add active moves system table 2022-10-25 13:56:46 +00:00
StorageSystemMutations.cpp Replace all Context references with std::weak_ptr (#22297) 2021-04-11 02:33:54 +03:00
StorageSystemMutations.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemNamedCollections.cpp Fix 2023-02-24 17:08:05 +01:00
StorageSystemNamedCollections.h Support arbitrary structure collections 2022-11-10 17:05:24 +01:00
StorageSystemNumbers.cpp Fix memory order in number_mt 2023-04-12 19:35:12 +00:00
StorageSystemNumbers.h Propagate input_format_parquet_preserve_order to parallelizeOutputAfterReading() 2023-05-05 04:20:27 +00:00
StorageSystemOne.cpp Fixes for -Wshorten-64-to-32 2022-10-21 13:25:19 +02:00
StorageSystemOne.h Propagate input_format_parquet_preserve_order to parallelizeOutputAfterReading() 2023-05-05 04:20:27 +00:00
StorageSystemPartMovesBetweenShards.cpp Rewrite part movement between shards logic and add kill support 2021-09-17 18:11:32 +01:00
StorageSystemPartMovesBetweenShards.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemParts.cpp use std::lerp, constexpr hex.h 2023-03-07 22:50:17 +00:00
StorageSystemParts.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemPartsBase.cpp add aliases for parts name and names 2023-04-17 13:18:40 +00:00
StorageSystemPartsBase.h Refactor BSONEachRow format, fix bugs, support more data types, support parallel parsing and schema inference 2022-11-10 20:15:14 +00:00
StorageSystemPartsColumns.cpp Fix race in system.parts and system.parts_columns 2022-12-31 15:07:26 +01:00
StorageSystemPartsColumns.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemPrivileges.cpp Remove unused code 2023-02-09 17:44:26 +01:00
StorageSystemPrivileges.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemProcesses.cpp Fix elapsed column in system.processes (10x error) 2023-02-04 22:37:11 +01:00
StorageSystemProcesses.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemProjectionParts.cpp use std::lerp, constexpr hex.h 2023-03-07 22:50:17 +00:00
StorageSystemProjectionParts.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemProjectionPartsColumns.cpp better semantic of constsness of DataPartStorage 2022-10-23 15:24:20 +00:00
StorageSystemProjectionPartsColumns.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemQueryCache.cpp Support totals and extremes in query cache 2023-04-24 22:23:27 +00:00
StorageSystemQueryCache.h Renaming: "Query Result Cache" --> "Query Cache" 2023-01-31 09:54:34 +00:00
StorageSystemQuotaLimits.cpp Fixes for -Wshorten-64-to-32 2022-10-21 13:25:19 +02:00
StorageSystemQuotaLimits.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemQuotas.cpp Fixes for -Wshorten-64-to-32 2022-10-21 13:25:19 +02:00
StorageSystemQuotas.h Implement backup/restore for ACL system tables (system.users, system.roles, etc.) 2022-06-17 18:14:31 +02:00
StorageSystemQuotasUsage.cpp Two ways to provide access to system.users: "GRANT SHOW USERS ON *.*" and "GRANT SELECT ON system.users" 2022-07-15 15:44:29 +02:00
StorageSystemQuotasUsage.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemQuotaUsage.cpp Fixes for -Wshorten-64-to-32 2022-10-21 13:25:19 +02:00
StorageSystemQuotaUsage.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemRemoteDataPaths.cpp Address review comments 2023-05-03 14:37:18 +02:00
StorageSystemRemoteDataPaths.h Fixes for -Wshorten-64-to-32 2022-10-21 13:25:19 +02:00
StorageSystemReplicas.cpp Fixes for clang-17 2023-05-13 02:57:31 +02:00
StorageSystemReplicas.h Fixes for -Wshorten-64-to-32 2022-10-21 13:25:19 +02:00
StorageSystemReplicatedFetches.cpp Replace all Context references with std::weak_ptr (#22297) 2021-04-11 02:33:54 +03:00
StorageSystemReplicatedFetches.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemReplicationQueue.cpp Add last_exception_time to replication_queue 2023-01-20 15:20:57 +08:00
StorageSystemReplicationQueue.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemRoleGrants.cpp Two ways to provide access to system.users: "GRANT SHOW USERS ON *.*" and "GRANT SELECT ON system.users" 2022-07-15 15:44:29 +02:00
StorageSystemRoleGrants.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemRoles.cpp Two ways to provide access to system.users: "GRANT SHOW USERS ON *.*" and "GRANT SELECT ON system.users" 2022-07-15 15:44:29 +02:00
StorageSystemRoles.h Implement backup/restore for ACL system tables (system.users, system.roles, etc.) 2022-06-17 18:14:31 +02:00
StorageSystemRowPolicies.cpp Two ways to provide access to system.users: "GRANT SHOW USERS ON *.*" and "GRANT SELECT ON system.users" 2022-07-15 15:44:29 +02:00
StorageSystemRowPolicies.h Implement backup/restore for ACL system tables (system.users, system.roles, etc.) 2022-06-17 18:14:31 +02:00
StorageSystemSchemaInferenceCache.cpp Small refactoring 2022-08-19 16:42:23 +00:00
StorageSystemSchemaInferenceCache.h Fix special build 2022-08-16 16:31:22 +02:00
StorageSystemServerSettings.cpp Add default column for system.settings and system.server_settings 2023-02-23 18:24:57 -05:00
StorageSystemServerSettings.h Implement system.server_settings 2023-02-17 23:46:09 -05:00
StorageSystemSettings.cpp Clean up GCC warning pragmas 2023-04-11 18:21:08 +00:00
StorageSystemSettings.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemSettingsChanges.cpp Add system table settings_changes 2022-07-18 13:19:41 +00:00
StorageSystemSettingsChanges.h Add system table settings_changes 2022-07-18 13:19:41 +00:00
StorageSystemSettingsProfileElements.cpp Fix assigning a setting to NULL in settings profile's definition. 2023-05-12 11:04:30 +02:00
StorageSystemSettingsProfileElements.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemSettingsProfiles.cpp Two ways to provide access to system.users: "GRANT SHOW USERS ON *.*" and "GRANT SELECT ON system.users" 2022-07-15 15:44:29 +02:00
StorageSystemSettingsProfiles.h Implement backup/restore for ACL system tables (system.users, system.roles, etc.) 2022-06-17 18:14:31 +02:00
StorageSystemStackTrace.cpp Merge branch 'master' into system-stack-trace-fix 2023-05-07 06:05:47 +03:00
StorageSystemStackTrace.h Fixes for -Wshorten-64-to-32 2022-10-21 13:25:19 +02:00
StorageSystemStoragePolicies.cpp add columns perform_ttl_move_on_insert, load_balancing for table system.storage_policies 2023-03-29 19:58:25 +08:00
StorageSystemStoragePolicies.h Fixes for -Wshorten-64-to-32 2022-10-21 13:25:19 +02:00
StorageSystemTableEngines.cpp Projections 2021-05-11 18:12:23 +08:00
StorageSystemTableEngines.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemTableFunctions.cpp Added new field allow_readonly in system.table_functions to allow using table functions in readonly mode. 2022-10-26 18:45:23 +02:00
StorageSystemTableFunctions.h A prototype for embedded documentation 2022-08-26 03:41:52 +02:00
StorageSystemTables.cpp setting and some docs 2023-02-27 13:18:21 +00:00
StorageSystemTables.h Fixes for -Wshorten-64-to-32 2022-10-21 13:25:19 +02:00
StorageSystemTimeZones.cpp Replace all Context references with std::weak_ptr (#22297) 2021-04-11 02:33:54 +03:00
StorageSystemTimeZones.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemTransactions.cpp handle connection loss on commit 2022-05-20 17:35:29 +02:00
StorageSystemTransactions.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemUserDirectories.cpp Rename AccessControlManager -> AccessControl. 2021-11-02 14:06:20 +03:00
StorageSystemUserDirectories.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemUsers.cpp Two ways to provide access to system.users: "GRANT SHOW USERS ON *.*" and "GRANT SELECT ON system.users" 2022-07-15 15:44:29 +02:00
StorageSystemUsers.h Implement backup/restore for ACL system tables (system.users, system.roles, etc.) 2022-06-17 18:14:31 +02:00
StorageSystemWarnings.cpp Comments 2021-07-13 03:59:52 +03:00
StorageSystemWarnings.h Don't let storages inherit from boost::noncopyable 2022-05-03 09:07:08 +02:00
StorageSystemZeros.cpp Fixes for -Wshorten-64-to-32 2022-10-21 13:25:19 +02:00
StorageSystemZeros.h Propagate input_format_parquet_preserve_order to parallelizeOutputAfterReading() 2023-05-05 04:20:27 +00:00
StorageSystemZooKeeper.cpp Fix segfault 2023-04-18 16:30:58 +02:00
StorageSystemZooKeeper.h Add reading step for system zookeeper. Analyze path from filter DAG. 2023-04-06 12:24:22 +00:00
StorageSystemZooKeeperConnection.cpp Add zookeeper name in endpoint id (#49780) 2023-05-25 12:50:14 +03:00
StorageSystemZooKeeperConnection.h New system table zookeeper connection (#45245) 2023-05-19 17:06:43 +03:00