尝试使用 readyset 连接 tidb

阅读 32

2023-08-03

ReadySet is a distributed SQL caching layer that precomputes the results of parameterized SQL queries and incrementally updates these results as the underlying data changes. It is wire-compatible with MySQL and Postgres, plugs directly into existing databases and applications without any code changes, and elastically scales read throughput to meet fluctuating demands. ReadySet offers the low latencies of a custom caching system and the high query throughputs of read replicas with the straightforward developer experience of using a single relational database.

启动

docker run -d \
--name=readyset \
--publish=3307:3307 \
--platform=linux/amd64 \
--pull=always \
-e DEPLOYMENT_ENV=quickstart_github \
public.ecr.aws/readyset/readyset:beta-2023-06-29 \
--standalone \
--deployment='github-mysql' \
--database-type=mysql \
--upstream-db-url=mysql://readyset:readyset@192.168.195.128:28157/test \
--address=0.0.0.0:3307 \
--username='root' \
--password=''

报错

[shawnyan@centos7 7.2]$ docker logs readyset
2023-08-03T00:58:40.583633Z  INFO readyset: Starting ReadySet adapter options=Options { address: Some(0.0.0.0:3307), deployment: "github-mysql", database_type: Some(MySQL), standalone: true, authority: Standalone, authority_address: ".", log_slow: false, allow_unauthenticated_connections: false, query_caching: Explicit, max_processing_minutes: 15, migration_task_interval: 20000, metrics_address: 0.0.0.0:6034, username: Some("root"), password: Some(<redacted>), prometheus_metrics: false, noria_metrics: false, query_log: false, query_log_ad_hoc: false, use_aws_external_address: false, tracing: Options { log_format: Full, log_level: "info", tracing_host: None, tracing_sample_percent: Percent(0.01), statement_logging: false, statement_log_path: None }, psql_options: Options { readyset_identity_file: None, readyset_identity_file_password: None, postgres_authentication_method: ScramSha256 }, allow_unsupported_set: false, unsupported_set_mode: Error, views_polling_interval: 5, migration_request_timeout_ms: 1800000, controller_request_timeout_ms: 5000, query_max_failure_seconds: 9223372036854775, fallback_recovery_seconds: 0, non_blocking_reads: false, embedded_readers: false, server_worker_options: WorkerOptions { durability: Permanent, persistence_threads: 6, memory: 0, memory_check_freq: 1, eviction_kind: LRU, no_partial: false, forbid_full_materialization: false, enable_packet_filters: false, quorum: 1, shards: 0, volume_id: None, enable_experimental_topk_support: false, enable_experimental_paginate_support: false, enable_experimental_mixed_comparisons: false, db_dir: None, domain_replication_options: ReplicationOptions { reader_replicas: None, non_base_replicas: None }, replicator_config: UpstreamConfig { upstream_db_url: Some(<redacted>), disable_upstream_ssl_verification: false, ssl_root_cert: None, disable_setup_ddl_replication: false, replication_server_id: None, replicator_restart_timeout: 1s, replication_tables: None, snapshot_report_interval_secs: 30, replication_pool_size: 50 }, worker_request_timeout_seconds: 1800 }, disable_telemetry: false, wait_for_failpoint: false, fallback_cache_options: FallbackCacheOptions { enable_fallback_cache: false, ttl_seconds: 120, model_disk: false, eviction_options: FallbackCacheEvictionOptions { model_eviction: false, eviction_rate: 0.01 } }, experimental_placeholder_inlining: false, no_upstream_connections: false, cleanup: false, controller_address: None }
2023-08-03T00:58:40.583870Z  INFO readyset: version={release-version: beta-2023-06-29, commit_id: cd552cb98fb90ec5f8a552d88502ce2123a2f89c, platform: x86_64-unknown-linux-gnu, rustc_version: rustc 1.70.0-nightly (f63ccaf25 2023-03-06), profile: release, opt_level: 3}
2023-08-03T00:58:40.583952Z  INFO readyset: Listening for new connections listen_address=0.0.0.0:3307
2023-08-03T00:58:40.584015Z  INFO Connecting to RS server: readyset: options.authority_address=. options.deployment=github-mysql
2023-08-03T00:58:40.607221Z  INFO Connecting to RS server: readyset: ReadySetHandle created
2023-08-03T00:58:40.607266Z  INFO Connecting to RS server: readyset: Now capturing ctrl-c and SIGTERM events
2023-08-03T00:58:40.607275Z  INFO Connecting to RS server: readyset: PrometheusHandle created
2023-08-03T00:58:40.607285Z  INFO Connecting to RS server: readyset: Query logs are disabled
2023-08-03T00:58:40.607289Z  INFO Connecting to RS server: readyset: Will perform Blocking Reads
2023-08-03T00:58:40.607293Z  INFO Connecting to RS server: readyset: migration_style=Explicit
2023-08-03T00:58:40.607446Z  INFO Connecting to RS server: readyset: migration_mode=OutOfBand
2023-08-03T00:58:40.607461Z  INFO Connecting to RS server: readyset: Spawning HTTP request server task
2023-08-03T00:58:40.607480Z  INFO Connecting to RS server: readyset: Spawning migration handler task
2023-08-03T00:58:40.607493Z  INFO Connecting to RS server: readyset: Spawning explicit migrations task
2023-08-03T00:58:40.608151Z  INFO Connecting to RS server: readyset: supported=false
2023-08-03T00:58:40.680797Z  INFO readyset_server::controller: won leader election, creating Leader
2023-08-03T00:58:40.680984Z  INFO readyset_server::controller::inner: received registration payload from worker worker_uri=http://127.0.0.1:6033/ reader_addr=127.0.0.1:4000
2023-08-03T00:58:40.704069Z  INFO readyset_server::worker: worker informed of new controller controller_uri=http://127.0.0.1:6033/
2023-08-03T00:58:40.704689Z  INFO readyset_server::worker: controller requested that this worker clears its existing domains
2023-08-03T00:58:40.704977Z  INFO readyset_server::controller::inner: now have 1 of 1 required workers
2023-08-03T00:58:40.716062Z  INFO taking database snapshot: replicators::noria_adapter: Starting snapshot
2023-08-03T00:58:40.717235Z  WARN taking database snapshot: replicators::mysql_connector::snapshot: Failed to aquire instance lock, DDL changes may cause inconsistency err=Server error: `ERROR 42000 (1064): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 13 near "INSTANCE FOR BACKUP" '
2023-08-03T00:58:40.719921Z ERROR taking database snapshot: replicators::mysql_connector::snapshot: error=Error during replication: Server error: `ERROR 42000 (1235): function READ ONLY has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions'
2023-08-03T00:58:40.720137Z  WARN replicators::noria_adapter: Restarting adapter after error encountered error=Error during replication: Server error: `ERROR 42000 (1235): function READ ONLY has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions'
2023-08-03T00:58:40.720150Z ERROR replicators: Error in replication, will retry after timeout error=Error during replication: Server error: `ERROR 42000 (1235): function READ ONLY has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions' timeout_sec=1
2023-08-03T00:58:41.671976Z  INFO readyset_server::worker: worker informed of new controller controller_uri=http://127.0.0.1:6033/
2023-08-03T00:58:41.733625Z  INFO taking database snapshot: replicators::noria_adapter: Starting snapshot
2023-08-03T00:58:41.734674Z  WARN taking database snapshot: replicators::mysql_connector::snapshot: Failed to aquire instance lock, DDL changes may cause inconsistency err=Server error: `ERROR 42000 (1064): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 13 near "INSTANCE FOR BACKUP" '
2023-08-03T00:58:41.736408Z ERROR taking database snapshot: replicators::mysql_connector::snapshot: error=Error during replication: Server error: `ERROR 42000 (1235): function READ ONLY has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions'
2023-08-03T00:58:41.736643Z  WARN replicators::noria_adapter: Restarting adapter after error encountered error=Error during replication: Server error: `ERROR 42000 (1235): function READ ONLY has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions'
2023-08-03T00:58:41.736662Z ERROR replicators: Error in replication, will retry after timeout error=Error during replication: Server error: `ERROR 42000 (1235): function READ ONLY has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions' timeout_sec=1
2023-08-03T00:58:42.667434Z  WARN readyset_telemetry_reporter::reporter: failed to send telemetry res=Err(Elapsed(())) event=AdapterStart payload=Telemetry { db_backend: Some("mysql"), db_version: None, adapter_version: Some("0.1.0"), server_version: None, query_id: None, schema: None, proxied_query: None, migration_status: None }
2023-08-03T00:58:42.743296Z  INFO taking database snapshot: replicators::noria_adapter: Starting snapshot
2023-08-03T00:58:42.744809Z  WARN taking database snapshot: replicators::mysql_connector::snapshot: Failed to aquire instance lock, DDL changes may cause inconsistency err=Server error: `ERROR 42000 (1064): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 13 near "INSTANCE FOR BACKUP" '
2023-08-03T00:58:42.746932Z ERROR taking database snapshot: replicators::mysql_connector::snapshot: error=Error during replication: Server error: `ERROR 42000 (1235): function READ ONLY has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions'
2023-08-03T00:58:42.747384Z  WARN replicators::noria_adapter: Restarting adapter after error encountered error=Error during replication: Server error: `ERROR 42000 (1235): function READ ONLY has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions'
2023-08-03T00:58:42.747760Z ERROR replicators: Error in replication, will retry after timeout error=Error during replication: Server error: `ERROR 42000 (1235): function READ ONLY has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions' timeout_sec=1
2023-08-03T00:58:43.754649Z  INFO taking database snapshot: replicators::noria_adapter: Starting snapshot
2023-08-03T00:58:43.755004Z  WARN taking database snapshot: replicators::mysql_connector::snapshot: Failed to aquire instance lock, DDL changes may cause inconsistency err=Server error: `ERROR 42000 (1064): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 13 near "INSTANCE FOR BACKUP" '
2023-08-03T00:58:43.756119Z ERROR taking database snapshot: replicators::mysql_connector::snapshot: error=Error during replication: Server error: `ERROR 42000 (1235): function READ ONLY has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions'
2023-08-03T00:58:43.756247Z  WARN replicators::noria_adapter: Restarting adapter after error encountered error=Error during replication: Server error: `ERROR 42000 (1235): function READ ONLY has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions'
2023-08-03T00:58:43.756261Z ERROR replicators: Error in replication, will retry after timeout error=Error during replication: Server error: `ERROR 42000 (1235): function READ ONLY has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions' timeout_sec=1
2023-08-03T00:58:44.670573Z  WARN readyset_telemetry_reporter::reporter: failed to send telemetry res=Err(Elapsed(())) event=ServerStart payload=Telemetry { db_backend: None, db_version: None, adapter_version: None, server_version: Some("0.7.0"), query_id: None, schema: None, proxied_query: None, migration_status: None }
2023-08-03T00:58:44.761455Z  INFO taking database snapshot: replicators::noria_adapter: Starting snapshot
2023-08-03T00:58:44.761820Z  WARN taking database snapshot: replicators::mysql_connector::snapshot: Failed to aquire instance lock, DDL changes may cause inconsistency err=Server error: `ERROR 42000 (1064): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 13 near "INSTANCE FOR BACKUP" '
2023-08-03T00:58:44.764767Z ERROR taking database snapshot: replicators::mysql_connector::snapshot: error=Error during replication: Server error: `ERROR 42000 (1235): function READ ONLY has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions'
2023-08-03T00:58:44.765108Z  WARN replicators::noria_adapter: Restarting adapter after error encountered error=Error during replication: Server error: `ERROR 42000 (1235): function READ ONLY has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions'
2023-08-03T00:58:44.765164Z ERROR replicators: Error in replication, will retry after timeout error=Error during replication: Server error: `ERROR 42000 (1235): function READ ONLY has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions' timeout_sec=1
2023-08-03T00:58:45.793566Z  INFO taking database snapshot: replicators::noria_adapter: Starting snapshot
2023-08-03T00:58:45.794516Z  WARN taking database snapshot: replicators::mysql_connector::snapshot: Failed to aquire instance lock, DDL changes may cause inconsistency err=Server error: `ERROR 42000 (1064): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 13 near "INSTANCE FOR BACKUP" '
2023-08-03T00:58:45.797190Z ERROR taking database snapshot: replicators::mysql_connector::snapshot: error=Error during replication: Server error: `ERROR 42000 (1235): function READ ONLY has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions'
2023-08-03T00:58:45.797401Z  WARN replicators::noria_adapter: Restarting adapter after error encountered error=Error during replication: Server error: `ERROR 42000 (1235): function READ ONLY has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions'
2023-08-03T00:58:45.797422Z ERROR replicators: Error in replication, will retry after timeout error=Error during replication: Server error: `ERROR 42000 (1235): function READ ONLY has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions' timeout_sec=1
2023-08-03T00:58:46.823824Z  INFO taking database snapshot: replicators::noria_adapter: Starting snapshot
2023-08-03T00:58:46.824607Z  WARN taking database snapshot: replicators::mysql_connector::snapshot: Failed to aquire instance lock, DDL changes may cause inconsistency err=Server error: `ERROR 42000 (1064): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 13 near "INSTANCE FOR BACKUP" '
2023-08-03T00:58:46.825731Z ERROR taking database snapshot: replicators::mysql_connector::snapshot: error=Error during replication: Server error: `ERROR 42000 (1235): function READ ONLY has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions'
2023-08-03T00:58:46.825875Z  WARN replicators::noria_adapter: Restarting adapter after error encountered error=Error during replication: Server error: `ERROR 42000 (1235): function READ ONLY has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions'
2023-08-03T00:58:46.825890Z ERROR replicators: Error in replication, will retry after timeout error=Error during replication: Server error: `ERROR 42000 (1235): function READ ONLY has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions' timeout_sec=1
2023-08-03T00:58:47.841686Z  INFO taking database snapshot: replicators::noria_adapter: Starting snapshot
2023-08-03T00:58:47.842230Z  WARN taking database snapshot: replicators::mysql_connector::snapshot: Failed to aquire instance lock, DDL changes may cause inconsistency err=Server error: `ERROR 42000 (1064): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 13 near "INSTANCE FOR BACKUP" '
2023-08-03T00:58:47.843278Z ERROR taking database snapshot: replicators::mysql_connector::snapshot: error=Error during replication: Server error: `ERROR 42000 (1235): function READ ONLY has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions'
2023-08-03T00:58:47.843434Z  WARN replicators::noria_adapter: Restarting adapter after error encountered error=Error during replication: Server error: `ERROR 42000 (1235): function READ ONLY has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions'
2023-08-03T00:58:47.843447Z ERROR replicators: Error in replication, will retry after timeout error=Error during replication: Server error: `ERROR 42000 (1235): function READ ONLY has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions' timeout_sec=1
2023-08-03T00:58:48.852636Z  INFO taking database snapshot: replicators::noria_adapter: Starting snapshot
2023-08-03T00:58:48.853241Z  WARN taking database snapshot: replicators::mysql_connector::snapshot: Failed to aquire instance lock, DDL changes may cause inconsistency err=Server error: `ERROR 42000 (1064): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 13 near "INSTANCE FOR BACKUP" '
2023-08-03T00:58:48.854221Z ERROR taking database snapshot: replicators::mysql_connector::snapshot: error=Error during replication: Server error: `ERROR 42000 (1235): function READ ONLY has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions'
2023-08-03T00:58:48.854340Z  WARN replicators::noria_adapter: Restarting adapter after error encountered error=Error during replication: Server error: `ERROR 42000 (1235): function READ ONLY has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions'
2023-08-03T00:58:48.854353Z ERROR replicators: Error in replication, will retry after timeout error=Error during replication: Server error: `ERROR 42000 (1235): function READ ONLY has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions' timeout_sec=1
2023-08-03T00:58:49.899949Z  INFO taking database snapshot: replicators::noria_adapter: Starting snapshot
2023-08-03T00:58:49.900486Z  WARN taking database snapshot: replicators::mysql_connector::snapshot: Failed to aquire instance lock, DDL changes may cause inconsistency err=Server error: `ERROR 42000 (1064): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 13 near "INSTANCE FOR BACKUP" '
2023-08-03T00:58:49.902210Z ERROR taking database snapshot: replicators::mysql_connector::snapshot: error=Error during replication: Server error: `ERROR 42000 (1235): function READ ONLY has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions'
2023-08-03T00:58:49.902838Z  WARN replicators::noria_adapter: Restarting adapter after error encountered error=Error during replication: Server error: `ERROR 42000 (1235): function READ ONLY has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions'
2023-08-03T00:58:49.902862Z ERROR replicators: Error in replication, will retry after timeout error=Error during replication: Server error: `ERROR 42000 (1235): function READ ONLY has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions' timeout_sec=1
[shawnyan@centos7 7.2]$
[shawnyan@centos7 7.2]$ ^C
[shawnyan@centos7 7.2]$ mysql -uroot -h192.168.195.128 -P3307
ERROR 1045 (28000): Access denied for user root
[shawnyan@centos7 7.2]$

readyset 尚无法连接tidb,且无法连接mysql 5.7,只支持mysql 8以上版本。

精彩评论(0)

0 0 举报