Coder Social home page Coder Social logo

oceanbase / obproxy Goto Github PK

View Code? Open in Web Editor NEW
112.0 15.0 76.0 17.77 MB

A proxy server for OceanBase Database.

Home Page: https://open.oceanbase.com

License: Other

Makefile 0.05% Shell 0.14% M4 0.06% C++ 62.73% C 36.28% Perl 0.03% Lex 0.26% Yacc 0.35% Python 0.06% PLpgSQL 0.04%

obproxy's Introduction

OceanBase Database Proxy

TODO: some badges here

OceanBase Database Proxy (ODP for short) is a dedicated proxy server for OceanBase Database. OceanBase Database stores its user data in multiple copies on different OBServers. ODP receives the SQL requests from the users, transfers the SQL requests to the target OBServer, then returns the execution results to the users.

Quick start

Refer to the Get Started guide [link TODO] to try out ODP.

Documentation

  • English [link TODO]
  • Simplified Chinese (简体中文) [link TODO]

Licencing

ODP is under MulanPubL - 2.0 licence. You can freely copy and use the source code. When you modify or distribute the source code, please obey the MulanPubL - 1.0 licence.

Contributing

Contributions are warmly welcomed and greatly appreciated. Here are a few ways you can contribute:

  • Raise us an issue [link TODO].
  • Submit Pull Requests. For details, see How to contribute.

Support

In case you have any problems when using OceanBase Database, welcome reach out for help:

  • GitHub Issue [link TODO]
  • Official forum [link TODO]
  • Knowledge base [link TODO]

obproxy's People

Contributors

jiangxianfu avatar lemon0910 avatar linxiansheng avatar lucklove avatar mizuhahimuraki avatar moonsphere avatar oceanbase-admin avatar phoeniwx avatar shenchai avatar simonjoylet avatar stutiredboy avatar typhoontai avatar wangzelin19961202 avatar wgs13579 avatar xiaoleizi2016 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

obproxy's Issues

[Bug]: fix some description

Check Before Asking

  • Please check the issue list and confirm this bug is encountered for the first time.
  • Please try full text in English and attach precise description.

Environment

No response

Fast Reproduce Steps

in ob_proxy_config.h
DEF_BOOL(enable_sharding, "false", "if enabled means use beyond trust", CFG_NO_NEED_REBOOT, CFG_SECTION_OBPROXY, CFG_VISIBLE_LEVEL_USER);

sharding has nothing to do with beyond trust.

Actual Behavior

DEF_BOOL(enable_sharding, "false", "if enabled means use logic db", CFG_NO_NEED_REBOOT, CFG_SECTION_OBPROXY, CFG_VISIBLE_LEVEL_USER);

Expected Behavior

No response

Other Information

No response

[Feature]: ODP不支持物理主备库的读写分离

Use Case

某业务比较小,只有2台服务器, 做物理主备比较合适,但在读写分离时遇到了问题,好像4.1版本的obproxy不支持物理主备库的读写分离,4.2版本支持基于网络的主备库,好像也不支持。 希望能支持。

Describe the solution you'd like

程序连接obproxy,根据设置或hint提示 可以访问主库,也可以访问备库

Describe alternatives you've considered

目前主库上并不能获取到备库的信息,odp也就没办法从主库获取备库的信息。 建议可以在obproxy中配置物理主备库的信息(路由缓存),可以根据健康检查脚本的返回结果去判断当前主备库的状态(处于主库、备库或者宕机状态), 类似于proxysql吧

Additional context

obproxy failed to cast to target type when using varchar field in hash partition

obproxy版本3.2.3、3.2.3.5

通过obproxy执行如下sql时,会出现截断报错,这可能影响proxy对partition的路由判断

select concat(tenant_name,'__', replace(NAME,' ','_')) NAME,VALUE
from oceanbase.gv$sysstat
join oceanbase.gv$tenant on CON_ID=tenant_id
where SVR_IP='xx.xx.xx.xx'
and NAME not in ('gts wait elapse total time','clog last check log file collect time')
union
select replace(NAME,' ','_'),sum(VALUE) VALUE
from oceanbase.gv$sysstat
join oceanbase.gv$tenant on CON_ID=tenant_id
where SVR_IP='xx.xx.xx.xx'
and NAME not in ('gts wait elapse total time','clog last check log file collect time','partition migrate time')
group by NAME

报错内容
image

[Feature]: 物理主备库不能利用obproxy实现读写分离

Use Case

某业务比较小,只有2台服务器, 做物理主备比较合适,但在读写分离时遇到了问题,好像4.1版本的obproxy不支持物理主备库的读写分离,希望能支持。

Describe the solution you'd like

程序连接obproxy,根据设置或hint提示 可以访问主库,也可以访问备库

Describe alternatives you've considered

目前主库上并不能获取到备库的信息。 建议可以在obproxy中配置物理主备库的信息(路由缓存),可以根据健康检查脚本的返回结果去判断当前主备库的状态(处于主库、备库或者宕机状态), 类似于proxysql吧

Additional context

ODP+logproxy使用binlog模式异常

一、背景:
测试ODP(4.2.1) + OB(4.2) + logproxy(2.0.0-bp/2.0.0)的可行性。

二、现象描述:

  1. 直接连接到 oblogproxy 执行 show master status
    并发执行没有问题

  2. 通过 obproxy 连接上,执行 show master status
    并发执行会有问题,ODP会偶发连接不上binlog service,任务失败

3.通过java sdk监听binlog数据
没有问题,即使通过sysbench并发写入时,监听也不会报错

4.相关报错的日志
mysql 客户端:
MySQL [test]> show master status;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...

obclient客户端:
obclient [test]> show master status;
ERROR 10025 (HY000): OBProxy connect binlog service failed
obclient [test]> show master status;
ERROR 2013 (HY000): Lost connection to MySQL server during query

obproxy报错:
[2024-02-05 17:18:59.773184] WARN [PROXY.SM] handle_server_setup_error (ob_mysql_sm.cpp:8405) [909028][Y0-00007F822169B950] [lt=7] [dc=0] trace_log(trans_state_.trace_log_= | dropped=0)
[2024-02-05 17:18:59.773191] INFO [PROXY.SS] ob_mysql_server_session.cpp:153 [909028][Y0-00007F822169B950] [lt=6] [dc=0] server session do_io_close((*this={ss_id:826839, server_sessid:3221828618, server_ip:{xxx:2881}, is_inited:true, magic:19136237, state:1, server_vc:0x7f822d8797d0, client_session:{this:0x7f821a355770, is_proxy_mysql_client:false, is_waiting_trans_first_request:false, need_delete_cluster:false, is_first_dml_sql_got:false, vc_ready_killed:false, active:true, magic:19132429, conn_decrease:true, current_tid:909028, cs_id:109585, proxy_sessid:740971881263490271, session_info:{is_inited:true, priv_info:{has_all_privilege:false, cs_id:109585, user_priv_set:133009965054, cluster_name:"xxx", tenant_name:"tp_tenant", user_name:"root"}, version:{common_hot_sys_var_version:0, common_sys_var_version:0, mysql_hot_sys_var_version:0, mysql_sys_var_version:0, hot_sys_var_version:1, sys_var_version:6, user_var_version:1, db_name_version:1, last_insert_id_version:0, sess_info_version:3}, hash_version:{common_hot_sys_var_version:0, common_sys_var_version:0, mysql_hot_sys_var_version:0, mysql_sys_var_version:0, hot_sys_var_version:0, sys_var_version:0, user_var_version:0, db_name_version:0, last_insert_id_version:0, sess_info_version:0}, val_hash:{common_hot_sys_var_hash:0, common_cold_sys_var_hash:0, mysql_hot_sys_var_hash:0, mysql_cold_sys_var_hash:0, hot_sys_var_hash:0, cold_sys_var_hash:0, user_var_hash:0}, global_vars_version:0, is_global_vars_changed:false, is_trans_specified:false, is_user_idc_name_set:false, is_read_consistency_set:false, idc_name:"", cluster_id:0, real_meta_cluster_name:"", safe_read_snapshot:1, syncing_safe_read_snapshot:0, route_policy:1, proxy_route_policy:3, user_identity:0, global_vars_version:0, is_read_only_user:false, is_request_follower_user:false, obproxy_force_parallel_query_dop:1, ob20_request:{remain_payload_len:0, ob20_request_received_done:false, ob20_header:{ob 20 protocol header:{compressed_len:0, seq:0, non_compressed_len:0}, magic_num:0, header_checksum:0, connection_id:0, request_id:0, pkt_seq:0, payload_len:0, version:0, flag_.flags:0, reserved:0}}, client_cap:0, server_cap:916303, last_server_addr:{Not IP address [0]:0}, last_server_sess_id:0, init_sql:""}, dummy_ldc:{use_ldc:true, idc_name:"default_idc", item_count:3, site_start_index_array:[[0]0, [1]3, [2]3, [3]3], item_array:[[0]{idc_type:"SAME_IDC", zone_type:"ReadWrite", replica:{server:"xxx:2881", is_dup_replica:false, role:"FOLLOWER", type:"FULL"}, is_merging:false, is_partition_server:false, is_force_congested:false, is_used:false}, [1]{idc_type:"SAME_IDC", zone_type:"ReadWrite", replica:{server:"xxx:2881", is_dup_replica:false, role:"FOLLOWER", type:"FULL"}, is_merging:false, is_partition_server:false, is_force_congested:false, is_used:false}, [2]{idc_type:"SAME_IDC", zone_type:"ReadWrite", replica:{server:"xxx:2881", is_dup_replica:false, role:"FOLLOWER", type:"FULL"}, is_merging:false, is_partition_server:false, is_force_congested:false, is_used:false}], pl:null, ts:0x7f823f588a80, readonly_exist_status:"READONLY_ZONE_NOT_EXIST"}, dummy_entry:0x7f822c980410, server_state_version:6, cur_ss:0x7f822b953230, bound_ss:null, lii_ss:null, cluster_resource:{this:0x7f822b1af080, ref_count:50, is_inited:true, cluster_info_key:{cluster_name:{config_string:"xxx"}, cluster_id:0}, cr_state:"CR_AVAIL", version:4, last_access_time_ns:1707124739771791698, deleting_completed_thread_num:0, fetch_rslist_task_count:0, fetch_idc_list_task_count:0, last_idc_list_refresh_time_ns:1707122165422588354, last_rslist_refresh_time_ns:0, server_state_version:6}, client_vc:0x7f822172b8a0, using_ldg:false, trace_stats:NULL}, transact_count:1, server_trans_stat:1, session_info:{cap:916303, ob_server:, version:{common_hot_sys_var_version:0, common_sys_var_version:0, mysql_hot_sys_var_version:0, mysql_sys_var_version:0, hot_sys_var_version:1, sys_var_version:6, user_var_version:1, db_name_version:1, last_insert_id_version:0, sess_info_version:3}, val_hash:{common_hot_sys_var_hash:0, common_cold_sys_var_hash:0, mysql_hot_sys_var_hash:0, mysql_cold_sys_var_hash:0, hot_sys_var_hash:0, cold_sys_var_hash:0, user_var_hash:0}, checksum_switch:1, server_type:1}}, server_vc_=0x7f822d8797d0, this=0x7f822b953230)
[2024-02-05 17:18:59.773291] INFO [PROXY.SS] ob_mysql_server_session.cpp:190 [909028][Y0-00007F822169B950] [lt=98] [dc=0] server session is closing(ss_id=826839, server_sessid=3221828618, server_ip={xxx:2881}, cs_id=109585, proxy_sessid=740971881263490271)
[2024-02-05 17:18:59.773302] INFO [PROXY.TXN] ob_mysql_transact.cpp:5761 [909028][Y0-00007F822169B950] [lt=4] [dc=0] [ObMysqlTransact::handle_server_connection_break](client_ip={xxx:15876}, server_ip={xxx3:2881}, cs_id=109585, proxy_sessid=740971881263490271, ss_id=0, server_sessid=0, sm_id=1785581, proxy_user_name=xxx, database_name=test, server_state="INTERNAL_ERROR", request_cmd="Quit", sql_cmd="Quit", sql=)
[2024-02-05 17:18:59.773311] INFO [PROXY.SM] ob_mysql_sm.cpp:9000 [909028][Y0-00007F822169B950] [lt=8] [dc=0] [setup_error_transfer] Now closing connection caused by OB_MYSQL_COM_QUIT(sm_id=1785581, request_cmd="Quit", sql_cmd="Quit", sql=)
[2024-02-05 17:18:59.773316] INFO [PROXY.SS] ob_mysql_client_session.cpp:652 [909028][Y0-00007F822169B950] [lt=3] [dc=0] client session do_io_close((*this={this:0x7f821a355770, is_proxy_mysql_client:false, is_waiting_trans_first_request:false, need_delete_cluster:false, is_first_dml_sql_got:false, vc_ready_killed:false, active:true, magic:19132429, conn_decrease:true, current_tid:909028, cs_id:109585, proxy_sessid:740971881263490271, session_info:{is_inited:true, priv_info:{has_all_privilege:false, cs_id:109585, user_priv_set:133009965054, cluster_name:"xxx", tenant_name:"tp_tenant", user_name:"root"}, version:{common_hot_sys_var_version:0, common_sys_var_version:0, mysql_hot_sys_var_version:0, mysql_sys_var_version:0, hot_sys_var_version:1, sys_var_version:6, user_var_version:1, db_name_version:1, last_insert_id_version:0, sess_info_version:3}, hash_version:{common_hot_sys_var_version:0, common_sys_var_version:0, mysql_hot_sys_var_version:0, mysql_sys_var_version:0, hot_sys_var_version:0, sys_var_version:0, user_var_version:0, db_name_version:0, last_insert_id_version:0, sess_info_version:0}, val_hash:{common_hot_sys_var_hash:0, common_cold_sys_var_hash:0, mysql_hot_sys_var_hash:0, mysql_cold_sys_var_hash:0, hot_sys_var_hash:0, cold_sys_var_hash:0, user_var_hash:0}, global_vars_version:0, is_global_vars_changed:false, is_trans_specified:false, is_user_idc_name_set:false, is_read_consistency_set:false, idc_name:"", cluster_id:0, real_meta_cluster_name:"", safe_read_snapshot:1, syncing_safe_read_snapshot:0, route_policy:1, proxy_route_policy:3, user_identity:0, global_vars_version:0, is_read_only_user:false, is_request_follower_user:false, obproxy_force_parallel_query_dop:1, ob20_request:{remain_payload_len:0, ob20_request_received_done:false, ob20_header:{ob 20 protocol header:{compressed_len:0, seq:0, non_compressed_len:0}, magic_num:0, header_checksum:0, connection_id:0, request_id:0, pkt_seq:0, payload_len:0, version:0, flag_.flags:0, reserved:0}}, client_cap:0, server_cap:916303, last_server_addr:{Not IP address [0]:0}, last_server_sess_id:0, init_sql:""}, dummy_ldc:{use_ldc:true, idc_name:"default_idc", item_count:3, site_start_index_array:[[0]0, [1]3, [2]3, [3]3], item_array:[[0]{idc_type:"SAME_IDC", zone_type:"ReadWrite", replica:{server:"xxx:2881", is_dup_replica:false, role:"FOLLOWER", type:"FULL"}, is_merging:false, is_partition_server:false, is_force_congested:false, is_used:false}, [1]{idc_type:"SAME_IDC", zone_type:"ReadWrite", replica:{server:"xxx.174:2881", is_dup_replica:false, role:"FOLLOWER", type:"FULL"}, is_merging:false, is_partition_server:false, is_force_congested:false, is_used:false}, [2]{idc_type:"SAME_IDC", zone_type:"ReadWrite", replica:{server:"xxx.183:2881", is_dup_replica:false, role:"FOLLOWER", type:"FULL"}, is_merging:false, is_partition_server:false, is_force_congested:false, is_used:false}], pl:null, ts:0x7f823f588a80, readonly_exist_status:"READONLY_ZONE_NOT_EXIST"}, dummy_entry:0x7f822c980410, server_state_version:6, cur_ss:null, bound_ss:null, lii_ss:null, cluster_resource:{this:0x7f822b1af080, ref_count:50, is_inited:true, cluster_info_key:{cluster_name:{config_string:"xxx"}, cluster_id:0}, cr_state:"CR_AVAIL", version:4, last_access_time_ns:1707124739771791698, deleting_completed_thread_num:0, fetch_rslist_task_count:0, fetch_idc_list_task_count:0, last_idc_list_refresh_time_ns:1707122165422588354, last_rslist_refresh_time_ns:0, server_state_version:6}, client_vc:0x7f822172b8a0, using_ldg:false, trace_stats:NULL}, client_vc_=0x7f822172b8a0, this=0x7f821a355770)
[2024-02-05 17:18:59.773361] INFO [PROXY.SS] ob_mysql_server_session.cpp:153 [909028][Y0-00007F822169B950] [lt=43] [dc=0] server session do_io_close((*this={ss_id:826838, server_sessid:660, server_ip:{xxx:2983}, is_inited:true, magic:19136237, state:3, server_vc:0x7f822d873650, client_session:{this:0x7f821a355770, is_proxy_mysql_client:false, is_waiting_trans_first_request:false, need_delete_cluster:false, is_first_dml_sql_got:false, vc_ready_killed:false, active:false, magic:19132429, conn_decrease:true, current_tid:909028, cs_id:109585, proxy_sessid:740971881263490271, session_info:{is_inited:true, priv_info:{has_all_privilege:false, cs_id:109585, user_priv_set:133009965054, cluster_name:"xxx", tenant_name:"tp_tenant", user_name:"root"}, version:{common_hot_sys_var_version:0, common_sys_var_version:0, mysql_hot_sys_var_version:0, mysql_sys_var_version:0, hot_sys_var_version:1, sys_var_version:6, user_var_version:1, db_name_version:1, last_insert_id_version:0, sess_info_version:3}, hash_version:{common_hot_sys_var_version:0, common_sys_var_version:0, mysql_hot_sys_var_version:0, mysql_sys_var_version:0, hot_sys_var_version:0, sys_var_version:0, user_var_version:0, db_name_version:0, last_insert_id_version:0, sess_info_version:0}, val_hash:{common_hot_sys_var_hash:0, common_cold_sys_var_hash:0, mysql_hot_sys_var_hash:0, mysql_cold_sys_var_hash:0, hot_sys_var_hash:0, cold_sys_var_hash:0, user_var_hash:0}, global_vars_version:0, is_global_vars_changed:false, is_trans_specified:false, is_user_idc_name_set:false, is_read_consistency_set:false, idc_name:"", cluster_id:0, real_meta_cluster_name:"", safe_read_snapshot:1, syncing_safe_read_snapshot:0, route_policy:1, proxy_route_policy:3, user_identity:0, global_vars_version:0, is_read_only_user:false, is_request_follower_user:false, obproxy_force_parallel_query_dop:1, ob20_request:{remain_payload_len:0, ob20_request_received_done:false, ob20_header:{ob 20 protocol header:{compressed_len:0, seq:0, non_compressed_len:0}, magic_num:0, header_checksum:0, connection_id:0, request_id:0, pkt_seq:0, payload_len:0, version:0, flag_.flags:0, reserved:0}}, client_cap:0, server_cap:916303, last_server_addr:{Not IP address [0]:0}, last_server_sess_id:0, init_sql:""}, dummy_ldc:{use_ldc:true, idc_name:"default_idc", item_count:3, site_start_index_array:[[0]0, [1]3, [2]3, [3]3], item_array:[[0]{idc_type:"SAME_IDC", zone_type:"ReadWrite", replica:{server:"xxx:2881", is_dup_replica:false, role:"FOLLOWER", type:"FULL"}, is_merging:false, is_partition_server:false, is_force_congested:false, is_used:false}, [1]{idc_type:"SAME_IDC", zone_type:"ReadWrite", replica:{server:"xxx:2881", is_dup_replica:false, role:"FOLLOWER", type:"FULL"}, is_merging:false, is_partition_server:false, is_force_congested:false, is_used:false}, [2]{idc_type:"SAME_IDC", zone_type:"ReadWrite", replica:{server:"xxx:2881", is_dup_replica:false, role:"FOLLOWER", type:"FULL"}, is_merging:false, is_partition_server:false, is_force_congested:false, is_used:false}], pl:null, ts:0x7f823f588a80, readonly_exist_status:"READONLY_ZONE_NOT_EXIST"}, dummy_entry:0x7f822c980410, server_state_version:6, cur_ss:null, bound_ss:null, lii_ss:null, cluster_resource:{this:0x7f822b1af080, ref_count:50, is_inited:true, cluster_info_key:{cluster_name:{config_string:"xxx"}, cluster_id:0}, cr_state:"CR_AVAIL", version:4, last_access_time_ns:1707124739771791698, deleting_completed_thread_num:0, fetch_rslist_task_count:0, fetch_idc_list_task_count:0, last_idc_list_refresh_time_ns:1707122165422588354, last_rslist_refresh_time_ns:0, server_state_version:6}, client_vc:0x7f822172b8a0, using_ldg:false, trace_stats:NULL}, transact_count:1, server_trans_stat:0, session_info:{cap:0, ob_server:, version:{common_hot_sys_var_version:0, common_sys_var_version:0, mysql_hot_sys_var_version:0, mysql_sys_var_version:0, hot_sys_var_version:1, sys_var_version:6, user_var_version:1, db_name_version:0, last_insert_id_version:0, sess_info_version:1}, val_hash:{common_hot_sys_var_hash:0, common_cold_sys_var_hash:0, mysql_hot_sys_var_hash:0, mysql_cold_sys_var_hash:0, hot_sys_var_hash:0, cold_sys_var_hash:0, user_var_hash:0}, checksum_switch:1, server_type:1}}, server_vc_=0x7f822d873650, this=0x7f822b950d10)
[2024-02-05 17:18:59.773453] INFO [PROXY.SS] ob_mysql_server_session.cpp:190 [909028][Y0-00007F822169B950] [lt=81] [dc=0] server session is closing(ss_id=826838, server_sessid=660, server_ip={xxx:2983}, cs_id=109585, proxy_sessid=740971881263490271)
[2024-02-05 17:18:59.773464] INFO [PROXY.SS] ob_mysql_server_session.cpp:153 [909028][Y0-00007F822169B950] [lt=5] [dc=0] server session do_io_close((*this={ss_id:826837, server_sessid:3221550586, server_ip:{xxx.174:2881}, is_inited:true, magic:19136237, state:3, server_vc:0x7f822d87a670, client_session:{this:0x7f821a355770, is_proxy_mysql_client:false, is_waiting_trans_first_request:false, need_delete_cluster:false, is_first_dml_sql_got:false, vc_ready_killed:false, active:false, magic:19132429, conn_decrease:true, current_tid:909028, cs_id:109585, proxy_sessid:740971881263490271, session_info:{is_inited:true, priv_info:{has_all_privilege:false, cs_id:109585, user_priv_set:133009965054, cluster_name:"xxx", tenant_name:"tp_tenant", user_name:"root"}, version:{common_hot_sys_var_version:0, common_sys_var_version:0, mysql_hot_sys_var_version:0, mysql_sys_var_version:0, hot_sys_var_version:1, sys_var_version:6, user_var_version:1, db_name_version:1, last_insert_id_version:0, sess_info_version:3}, hash_version:{common_hot_sys_var_version:0, common_sys_var_version:0, mysql_hot_sys_var_version:0, mysql_sys_var_version:0, hot_sys_var_version:0, sys_var_version:0, user_var_version:0, db_name_version:0, last_insert_id_version:0, sess_info_version:0}, val_hash:{common_hot_sys_var_hash:0, common_cold_sys_var_hash:0, mysql_hot_sys_var_hash:0, mysql_cold_sys_var_hash:0, hot_sys_var_hash:0, cold_sys_var_hash:0, user_var_hash:0}, global_vars_version:0, is_global_vars_changed:false, is_trans_specified:false, is_user_idc_name_set:false, is_read_consistency_set:false, idc_name:"", cluster_id:0, real_meta_cluster_name:"", safe_read_snapshot:1, syncing_safe_read_snapshot:0, route_policy:1, proxy_route_policy:3, user_identity:0, global_vars_version:0, is_read_only_user:false, is_request_follower_user:false, obproxy_force_parallel_query_dop:1, ob20_request:{remain_payload_len:0, ob20_request_received_done:false, ob20_header:{ob 20 protocol header:{compressed_len:0, seq:0, non_compressed_len:0}, magic_num:0, header_checksum:0, connection_id:0, request_id:0, pkt_seq:0, payload_len:0, version:0, flag_.flags:0, reserved:0}}, client_cap:0, server_cap:916303, last_server_addr:{Not IP address [0]:0}, last_server_sess_id:0, init_sql:""}, dummy_ldc:{use_ldc:true, idc_name:"default_idc", item_count:3, site_start_index_array:[[0]0, [1]3, [2]3, [3]3], item_array:[[0]{idc_type:"SAME_IDC", zone_type:"ReadWrite", replica:{server:"xxx:2881", is_dup_replica:false, role:"FOLLOWER", type:"FULL"}, is_merging:false, is_partition_server:false, is_force_congested:false, is_used:false}, [1]{idc_type:"SAME_IDC", zone_type:"ReadWrite", replica:{server:"xxx:2881", is_dup_replica:false, role:"FOLLOWER", type:"FULL"}, is_merging:false, is_partition_server:false, is_force_congested:false, is_used:false}, [2]{idc_type:"SAME_IDC", zone_type:"ReadWrite", replica:{server:"xxx:2881", is_dup_replica:false, role:"FOLLOWER", type:"FULL"}, is_merging:false, is_partition_server:false, is_force_congested:false, is_used:false}], pl:null, ts:0x7f823f588a80, readonly_exist_status:"READONLY_ZONE_NOT_EXIST"}, dummy_entry:0x7f822c980410, server_state_version:6, cur_ss:null, bound_ss:null, lii_ss:null, cluster_resource:{this:0x7f822b1af080, ref_count:50, is_inited:true, cluster_info_key:{cluster_name:{config_string:"xxx"}, cluster_id:0}, cr_state:"CR_AVAIL", version:4, last_access_time_ns:1707124739771791698, deleting_completed_thread_num:0, fetch_rslist_task_count:0, fetch_idc_list_task_count:0, last_idc_list_refresh_time_ns:1707122165422588354, last_rslist_refresh_time_ns:0, server_state_version:6}, client_vc:0x7f822172b8a0, using_ldg:false, trace_stats:NULL}, transact_count:2, server_trans_stat:0, session_info:{cap:916303, ob_server:, version:{common_hot_sys_var_version:0, common_sys_var_version:0, mysql_hot_sys_var_version:0, mysql_sys_var_version:0, hot_sys_var_version:1, sys_var_version:6, user_var_version:1, db_name_version:1, last_insert_id_version:0, sess_info_version:1}, val_hash:{common_hot_sys_var_hash:0, common_cold_sys_var_hash:0, mysql_hot_sys_var_hash:0, mysql_cold_sys_var_hash:0, hot_sys_var_hash:0, cold_sys_var_hash:0, user_var_hash:0}, checksum_switch:1, server_type:1}}, server_vc_=0x7f822d87a670, this=0x7f822b953e90)
[2024-02-05 17:18:59.773553] INFO [PROXY.SS] ob_mysql_server_session.cpp:190 [909028][Y0-00007F822169B950] [lt=81] [dc=0] server session is closing(ss_id=826837, server_sessid=3221550586, server_ip={xxx.174:2881}, cs_id=109585, proxy_sessid=740971881263490271)
[2024-02-05 17:18:59.773572] INFO [PROXY.CS] ob_mysql_client_session.cpp:94 [909028][Y0-00007F822169B950] [lt=4] [dc=0] client session destroy(cs_id=109585, proxy_sessid=740971881263490271, client_vc=NULL)
[2024-02-05 17:18:59.773585] INFO [PROXY.SM] ob_mysql_sm.cpp:9653 [909028][Y0-00007F822169B950] [lt=4] [dc=0] deallocating sm(sm_id=1785581)
[2024-02-05 17:18:59.775521] INFO [PROXY.SOCK] ob_connection.cpp:369 [909087][Y0-0000000000000000] [lt=8] [dc=0] connection accepted(client={xxx:15878}, server={0.0.0.0:2883}, accepted_fd=184, listen_fd=176)
[2024-02-05 17:18:59.775549] INFO [PROXY.NET] ob_mysql_session_accept.cpp:36 [909028][Y0-00007F8221906960] [lt=3] [dc=0] [ObMysqlSessionAccept:main_event] accepted connection(netvc=0x7f822e6a1a40, client_ip={xxx:15878})
[2024-02-05 17:18:59.775563] INFO [PROXY.NET] ob_unix_net_vconnection.cpp:1255 [909028][Y0-00007F8221906960] [lt=7] [dc=0] vip connect(protocol=6, fd=184, vid=0, vaddr={xxx:2883}, caddr={xxx:15878}, daddr={xxx:2883})
[2024-02-05 17:18:59.775572] INFO [PROXY.CS] ob_mysql_client_session.cpp:370 [909028][Y0-00007F8221906960] [lt=8] [dc=0] client session born(cs_id=109586, proxy_sessid=0, is_local_connection=false, client_vc=0x7f822e6a1a40, client_fd=184, client_addr="xxx:15878")
[2024-02-05 17:18:59.775582] INFO [PROXY.CS] ob_mysql_client_session.cpp:241 [909028][Y0-00007F8221906960] [lt=5] [dc=0] Starting new transaction using sm(cs_id=109586, get_transact_count()=0, sm_id=1785582)
[2024-02-05 17:18:59.775588] INFO [PROXY.SM] ob_mysql_sm.cpp:521 [909028][Y0-00007F8221906960] [lt=4] [dc=0] the request already in buffer, continue to handle it(buffer len=0, is_auth_rquest=true)
[2024-02-05 17:18:59.775592] WARN [PROXY] get_cluster_name (ob_session_field_mgr.cpp:617) [909028][Y0-00007F8221906960] [lt=3] [dc=0] fail to get cluster name(ret=-4018)
[2024-02-05 17:18:59.775597] WARN [PROXY] get_tenant_name (ob_session_field_mgr.cpp:629) [909028][Y0-00007F8221906960] [lt=4] [dc=0] fail to get tenant name(ret=-4018)
[2024-02-05 17:18:59.776538] INFO [PROXY.SM] ob_mysql_sm.cpp:1979 [909028][Y0-00007F8221906960] [lt=2] [dc=0] final client capability flag in negotiation(last_client_cap=0, is_client_support_ob20=false)
[2024-02-05 17:18:59.776546] INFO [PROXY] ob_vip_tenant_conn.cpp:162 [909028][Y0-00007F8221906960] [lt=6] [dc=0] vip tenant connect is not in vip_tenant_conn_cache(key_name=tp_tenant#xxx|, ret=-4018)
[2024-02-05 17:18:59.776551] INFO [PROXY.SM] ob_mysql_sm.cpp:2563 [909028][Y0-00007F8221906960] [lt=5] [dc=0] client login audit(client_addr={xxx:15878}, hsr.cluster_name_=xxx, hsr.tenant_name_=tp_tenant, hsr.user_name_=root, status="success")
[2024-02-05 17:18:59.776728] INFO [PROXY.SS] ob_mysql_server_session.cpp:106 [909028][Y0-00007F8221906960] [lt=7] [dc=0] server session born(ss_id=826840, server_ip={xxx.174:2881}, cs_id=109586, proxy_sessid=0, server_type=1)
[2024-02-05 17:18:59.776810] INFO [PROXY.TXN] ob_mysql_transact.cpp:4726 [909028][Y0-00007F8221906960] [lt=10] [dc=0] succ to set proxy_sessid(cs_id=109586, proxy_sessid=740971881263490272, server_ip={xxx.174:2881}, ss_id=826840, server_sessid=3221550594, is_proxy_mysql_client=false, ss_fd=185, client_addr="xxx:15878")
[2024-02-05 17:18:59.777418] INFO [PROXY] ob_proxy_session_info_handler.cpp:713 [909028][Y0-00007F8221906960] [lt=8] [dc=0] get global vars version(value=0, version=0)
[2024-02-05 17:18:59.777429] INFO [PROXY] ob_proxy_session_info_handler.cpp:746 [909028][Y0-00007F8221906960] [lt=6] [dc=0] succ to set ob_capability_flag in negotiation(client_cap=0, server_cap=916303, orig_client_cap=0, orig_server_cap=916303, client_support_ob_v2=false, server_support_checksum=true, server_support_ob_v2=true, is_auth_request=true)
[2024-02-05 17:18:59.777438] INFO [PROXY] ob_proxy_session_info_handler.cpp:773 [909028][Y0-00007F8221906960] [lt=6] [dc=0] succ to set checksum_switch(enable_transmission_checksum=1, old_switch=1, is_auth_request=true)
[2024-02-05 17:18:59.777475] INFO [PROXY] ob_session_field_mgr.cpp:1250 [909028][Y0-00007F8221906960] [lt=3] [dc=0] user variable not exist(name=min_cluster_version, ret=-4018)
[2024-02-05 17:18:59.777899] INFO [PROXY] ob_proxy_session_info_handler.cpp:773 [909028][Y0-00007F8221906960] [lt=5] [dc=0] succ to set checksum_switch(enable_transmission_checksum=1, old_switch=1, is_auth_request=false)
[2024-02-05 17:18:59.778407] INFO [PROXY] ob_table_entry_cont.cpp:682 [909002][Y0-00007F8221906960] [lt=24] [dc=0] get table entry from remote succ((newest_table_entry
={{this:0x7f8237a8ab70, ref_count:1, cr_version:0, cr_id:0, create_time_us:1707124739778402, last_valid_time_us:1707124739778395, last_access_time_us:1707124739778395, last_update_time_us:0, schema_version:0, tenant_version:0, time_for_expired:0, state:"AVAIL"}, this:0x7f8237a8ab70, is_inited:true, is_dummy_entry:false, is_entry_from_rslist:false, is_empty_entry_allowed:false, is_need_force_flush:false, has_dup_replica:false, cr_id:0, name:{cluster_name:"xxx", tenant_name:"tp_tenant", database_name:"oceanbase", package_name:"", table_name:"all_binlog_dummy"}, table_id:18446744073709551615, table_type:"UNKNOWN", part_num:0, replica_num:0, buf_len:53, buf_start:0x7f8237a8ac78, first_pl:{replica_count:1, locations:[[0]{server:"xxx:2983", is_dup_replica:false, role:"FOLLOWER", type:"FULL"}]}})
[2024-02-05 17:18:59.778589] INFO [PROXY.SS] ob_mysql_server_session.cpp:106 [909028][Y0-00007F8221906960] [lt=5] [dc=0] server session born(ss_id=826841, server_ip={xxx:2983}, cs_id=109586, proxy_sessid=740971881263490272, server_type=1)
[2024-02-05 17:18:59.898762] INFO [PROXY.SM] ob_mysql_sm.cpp:10217 [909028][Y0-00007F8221906960] [lt=9] [dc=0] Slow Query: ((client_ip={xxx:15878}, server_ip={xxx:2983}, obproxy_client_port={xxx:56906}, server_trace_id=, route_type=ROUTE_TYPE_MAX, user_name=root, tenant_name=tp_tenant, cluster_name=xxx, logic_database_name=, logic_tenant_name=, ob_proxy_protocol=0, cs_id=109586, proxy_sessid=740971881263490272, ss_id=826841, server_sessid=661, sm_id=1785582, cmd_size_stats={client_request_bytes:23, server_request_bytes:23, server_response_bytes:297, client_response_bytes:297}, cmd_time_stats={client_transaction_idle_time_us=0, client_request_read_time_us=5, client_request_analyze_time_us=4, cluster_resource_create_time_us=0, pl_lookup_time_us=0, pl_process_time_us=0, bl_lookup_time_us=310, bl_process_time_us=0, congestion_control_time_us=0, congestion_process_time_us=0, do_observer_open_time_us=148, server_connect_time_us=129, server_sync_session_variable_time_us=79840, server_send_saved_login_time_us=39856, server_send_use_database_time_us=0, server_send_session_variable_time_us=39983, server_send_session_user_variable_time_us=0, server_send_all_session_variable_time_us=0, server_send_start_trans_time_us=0, server_send_xa_start_time_us=0, server_send_init_sql_time_us=0, build_server_request_time_us=9, plugin_compress_request_time_us=0, prepare_send_request_to_server_time_us=80591, server_request_write_time_us=3, server_process_request_time_us=115, server_response_read_time_us=39906, plugin_decompress_response_time_us=0, server_response_analyze_time_us=1, ok_packet_trim_time_us=0, client_response_write_time_us=7, request_total_time_us=120625}, sql=show master status, trans_internal_routing_state=not in trans)
[2024-02-05 17:18:59.898928] WARN [PROXY.SM] handle_server_setup_error (ob_mysql_sm.cpp:8405) [909028][Y0-00007F8221906960] [lt=4] [dc=0] trace_log(trans_state
.trace_log
= | dropped=0)
[2024-02-05 17:18:59.898936] INFO [PROXY.SS] ob_mysql_server_session.cpp:153 [909028][Y0-00007F8221906960] [lt=7] [dc=0] server session do_io_close((*this={ss_id:826840, server_sessid:3221550594, server_ip:{xxx.174:2881}, is_inited:true, magic:19136237, state:1, server_vc:0x7f822d8797d0, client_session:{this:0x7f821a355770, is_proxy_mysql_client:false, is_waiting_trans_first_request:false, need_delete_cluster:false, is_first_dml_sql_got:false, vc_ready_killed:false, active:true, magic:19132429, conn_decrease:true, current_tid:909028, cs_id:109586, proxy_sessid:740971881263490272, session_info:{is_inited:true, priv_info:{has_all_privilege:false, cs_id:109586, user_priv_set:133009965054, cluster_name:"xxx", tenant_name:"tp_tenant", user_name:"root"}, version:{common_hot_sys_var_version:0, common_sys_var_version:0, mysql_hot_sys_var_version:0, mysql_sys_var_version:0, hot_sys_var_version:1, sys_var_version:6, user_var_version:1, db_name_version:1, last_insert_id_version:0, sess_info_version:1}, hash_version:{common_hot_sys_var_version:0, common_sys_var_version:0, mysql_hot_sys_var_version:0, mysql_sys_var_version:0, hot_sys_var_version:0, sys_var_version:0, user_var_version:0, db_name_version:0, last_insert_id_version:0, sess_info_version:0}, val_hash:{common_hot_sys_var_hash:0, common_cold_sys_var_hash:0, mysql_hot_sys_var_hash:0, mysql_cold_sys_var_hash:0, hot_sys_var_hash:0, cold_sys_var_hash:0, user_var_hash:0}, global_vars_version:0, is_global_vars_changed:false, is_trans_specified:false, is_user_idc_name_set:false, is_read_consistency_set:false, idc_name:"", cluster_id:0, real_meta_cluster_name:"", safe_read_snapshot:1, syncing_safe_read_snapshot:0, route_policy:1, proxy_route_policy:3, user_identity:0, global_vars_version:0, is_read_only_user:false, is_request_follower_user:false, obproxy_force_parallel_query_dop:1, ob20_request:{remain_payload_len:0, ob20_request_received_done:false, ob20_header:{ob 20 protocol header:{compressed_len:0, seq:0, non_compressed_len:0}, magic_num:0, header_checksum:0, connection_id:0, request_id:0, pkt_seq:0, payload_len:0, version:0, flag_.flags:0, reserved:0}}, client_cap:0, server_cap:916303, last_server_addr:{Not IP address [0]:0}, last_server_sess_id:0, init_sql:""}, dummy_ldc:{use_ldc:true, idc_name:"default_idc", item_count:3, site_start_index_array:[[0]0, [1]3, [2]3, [3]3], item_array:[[0]{idc_type:"SAME_IDC", zone_type:"ReadWrite", replica:{server:"xxx.174:2881", is_dup_replica:false, role:"FOLLOWER", type:"FULL"}, is_merging:false, is_partition_server:false, is_force_congested:false, is_used:false}, [1]{idc_type:"SAME_IDC", zone_type:"ReadWrite", replica:{server:"xxx.173:2881", is_dup_replica:false, role:"FOLLOWER", type:"FULL"}, is_merging:false, is_partition_server:false, is_force_congested:false, is_used:false}, [2]{idc_type:"SAME_IDC", zone_type:"ReadWrite", replica:{server:"xxx.183:2881", is_dup_replica:false, role:"FOLLOWER", type:"FULL"}, is_merging:false, is_partition_server:false, is_force_congested:false, is_used:false}], pl:null, ts:0x7f823f588a80, readonly_exist_status:"READONLY_ZONE_NOT_EXIST"}, dummy_entry:0x7f822c980410, server_state_version:6, cur_ss:0x7f822b953e90, bound_ss:null, lii_ss:null, cluster_resource:{this:0x7f822b1af080, ref_count:50, is_inited:true, cluster_info_key:{cluster_name:{config_string:"xxx"}, cluster_id:0}, cr_state:"CR_AVAIL", version:4, last_access_time_ns:1707124739898815076, deleting_completed_thread_num:0, fetch_rslist_task_count:0, fetch_idc_list_task_count:0, last_idc_list_refresh_time_ns:1707122165422588354, last_rslist_refresh_time_ns:0, server_state_version:6}, client_vc:0x7f822e6a1a40, using_ldg:false, trace_stats:NULL}, transact_count:3, server_trans_stat:1, session_info:{cap:916303, ob_server:, version:{common_hot_sys_var_version:0, common_sys_var_version:0, mysql_hot_sys_var_version:0, mysql_sys_var_version:0, hot_sys_var_version:1, sys_var_version:6, user_var_version:1, db_name_version:1, last_insert_id_version:0, sess_info_version:1}, val_hash:{common_hot_sys_var_hash:0, common_cold_sys_var_hash:0, mysql_hot_sys_var_hash:0, mysql_cold_sys_var_hash:0, hot_sys_var_hash:0, cold_sys_var_hash:0, user_var_hash:0}, checksum_switch:1, server_type:1}}, server_vc_=0x7f822d8797d0, this=0x7f822b953e90)
[2024-02-05 17:18:59.899038] INFO [PROXY.SS] ob_mysql_server_session.cpp:190 [909028][Y0-00007F8221906960] [lt=100] [dc=0] server session is closing(ss_id=826840, server_sessid=3221550594, server_ip={xxx.174:2881}, cs_id=109586, proxy_sessid=740971881263490272)
[2024-02-05 17:18:59.899053] INFO [PROXY.TXN] ob_mysql_transact.cpp:5761 [909028][Y0-00007F8221906960] [lt=5] [dc=0] [ObMysqlTransact::handle_server_connection_break](client_ip={xxx:15878}, server_ip={xxx.174:2881}, cs_id=109586, proxy_sessid=740971881263490272, ss_id=0, server_sessid=0, sm_id=1785582, proxy_user_name=root@tp_tenant#xxx, database_name=test, server_state="INTERNAL_ERROR", request_cmd="Quit", sql_cmd="Quit", sql=)
[2024-02-05 17:18:59.899062] INFO [PROXY.SM] ob_mysql_sm.cpp:9000 [909028][Y0-00007F8221906960] [lt=8] [dc=0] [setup_error_transfer] Now closing connection caused by OB_MYSQL_COM_QUIT(sm_id=1785582, request_cmd="Quit", sql_cmd="Quit", sql=)
[2024-02-05 17:18:59.899067] INFO [PROXY.SS] ob_mysql_client_session.cpp:652 [909028][Y0-00007F8221906960] [lt=3] [dc=0] client session do_io_close((*this={this:0x7f821a355770, is_proxy_mysql_client:false, is_waiting_trans_first_request:false, need_delete_cluster:false, is_first_dml_sql_got:false, vc_ready_killed:false, active:true, magic:19132429, conn_decrease:true, current_tid:909028, cs_id:109586, proxy_sessid:740971881263490272, session_info:{is_inited:true, priv_info:{has_all_privilege:false, cs_id:109586, user_priv_set:133009965054, cluster_name:"xxx", tenant_name:"tp_tenant", user_name:"root"}, version:{common_hot_sys_var_version:0, common_sys_var_version:0, mysql_hot_sys_var_version:0, mysql_sys_var_version:0, hot_sys_var_version:1, sys_var_version:6, user_var_version:1, db_name_version:1, last_insert_id_version:0, sess_info_version:1}, hash_version:{common_hot_sys_var_version:0, common_sys_var_version:0, mysql_hot_sys_var_version:0, mysql_sys_var_version:0, hot_sys_var_version:0, sys_var_version:0, user_var_version:0, db_name_version:0, last_insert_id_version:0, sess_info_version:0}, val_hash:{common_hot_sys_var_hash:0, common_cold_sys_var_hash:0, mysql_hot_sys_var_hash:0, mysql_cold_sys_var_hash:0, hot_sys_var_hash:0, cold_sys_var_hash:0, user_var_hash:0}, global_vars_version:0, is_global_vars_changed:false, is_trans_specified:false, is_user_idc_name_set:false, is_read_consistency_set:false, idc_name:"", cluster_id:0, real_meta_cluster_name:"", safe_read_snapshot:1, syncing_safe_read_snapshot:0, route_policy:1, proxy_route_policy:3, user_identity:0, global_vars_version:0, is_read_only_user:false, is_request_follower_user:false, obproxy_force_parallel_query_dop:1, ob20_request:{remain_payload_len:0, ob20_request_received_done:false, ob20_header:{ob 20 protocol header:{compressed_len:0, seq:0, non_compressed_len:0}, magic_num:0, header_checksum:0, connection_id:0, request_id:0, pkt_seq:0, payload_len:0, version:0, flag_.flags:0, reserved:0}}, client_cap:0, server_cap:916303, last_server_addr:{Not IP address [0]:0}, last_server_sess_id:0, init_sql:""}, dummy_ldc:{use_ldc:true, idc_name:"default_idc", item_count:3, site_start_index_array:[[0]0, [1]3, [2]3, [3]3], item_array:[[0]{idc_type:"SAME_IDC", zone_type:"ReadWrite", replica:{server:"xxx.174:2881", is_dup_replica:false, role:"FOLLOWER", type:"FULL"}, is_merging:false, is_partition_server:false, is_force_congested:false, is_used:false}, [1]{idc_type:"SAME_IDC", zone_type:"ReadWrite", replica:{server:"xxx.173:2881", is_dup_replica:false, role:"FOLLOWER", type:"FULL"}, is_merging:false, is_partition_server:false, is_force_congested:false, is_used:false}, [2]{idc_type:"SAME_IDC", zone_type:"ReadWrite", replica:{server:"xxx.183:2881", is_dup_replica:false, role:"FOLLOWER", type:"FULL"}, is_merging:false, is_partition_server:false, is_force_congested:false, is_used:false}], pl:null, ts:0x7f823f588a80, readonly_exist_status:"READONLY_ZONE_NOT_EXIST"}, dummy_entry:0x7f822c980410, server_state_version:6, cur_ss:null, bound_ss:null, lii_ss:null, cluster_resource:{this:0x7f822b1af080, ref_count:50, is_inited:true, cluster_info_key:{cluster_name:{config_string:"xxx"}, cluster_id:0}, cr_state:"CR_AVAIL", version:4, last_access_time_ns:1707124739898815076, deleting_completed_thread_num:0, fetch_rslist_task_count:0, fetch_idc_list_task_count:0, last_idc_list_refresh_time_ns:1707122165422588354, last_rslist_refresh_time_ns:0, server_state_version:6}, client_vc:0x7f822e6a1a40, using_ldg:false, trace_stats:NULL}, client_vc_=0x7f822e6a1a40, this=0x7f821a355770)
[2024-02-05 17:18:59.899110] INFO [PROXY.SS] ob_mysql_server_session.cpp:153 [909028][Y0-00007F8221906960] [lt=43] [dc=0] server session do_io_close((*this={ss_id:826841, server_sessid:661, server_ip:{xxx:2983}, is_inited:true, magic:19136237, state:3, server_vc:0x7f822d87a670, client_session:{this:0x7f821a355770, is_proxy_mysql_client:false, is_waiting_trans_first_request:false, need_delete_cluster:false, is_first_dml_sql_got:false, vc_ready_killed:false, active:false, magic:19132429, conn_decrease:true, current_tid:909028, cs_id:109586, proxy_sessid:740971881263490272, session_info:{is_inited:true, priv_info:{has_all_privilege:false, cs_id:109586, user_priv_set:133009965054, cluster_name:"xxx", tenant_name:"tp_tenant", user_name:"root"}, version:{common_hot_sys_var_version:0, common_sys_var_version:0, mysql_hot_sys_var_version:0, mysql_sys_var_version:0, hot_sys_var_version:1, sys_var_version:6, user_var_version:1, db_name_version:1, last_insert_id_version:0, sess_info_version:1}, hash_version:{common_hot_sys_var_version:0, common_sys_var_version:0, mysql_hot_sys_var_version:0, mysql_sys_var_version:0, hot_sys_var_version:0, sys_var_version:0, user_var_version:0, db_name_version:0, last_insert_id_version:0, sess_info_version:0}, val_hash:{common_hot_sys_var_hash:0, common_cold_sys_var_hash:0, mysql_hot_sys_var_hash:0, mysql_cold_sys_var_hash:0, hot_sys_var_hash:0, cold_sys_var_hash:0, user_var_hash:0}, global_vars_version:0, is_global_vars_changed:false, is_trans_specified:false, is_user_idc_name_set:false, is_read_consistency_set:false, idc_name:"", cluster_id:0, real_meta_cluster_name:"", safe_read_snapshot:1, syncing_safe_read_snapshot:0, route_policy:1, proxy_route_policy:3, user_identity:0, global_vars_version:0, is_read_only_user:false, is_request_follower_user:false, obproxy_force_parallel_query_dop:1, ob20_request:{remain_payload_len:0, ob20_request_received_done:false, ob20_header:{ob 20 protocol header:{compressed_len:0, seq:0, non_compressed_len:0}, magic_num:0, header_checksum:0, connection_id:0, request_id:0, pkt_seq:0, payload_len:0, version:0, flag_.flags:0, reserved:0}}, client_cap:0, server_cap:916303, last_server_addr:{Not IP address [0]:0}, last_server_sess_id:0, init_sql:""}, dummy_ldc:{use_ldc:true, idc_name:"default_idc", item_count:3, site_start_index_array:[[0]0, [1]3, [2]3, [3]3], item_array:[[0]{idc_type:"SAME_IDC", zone_type:"ReadWrite", replica:{server:"xxx.174:2881", is_dup_replica:false, role:"FOLLOWER", type:"FULL"}, is_merging:false, is_partition_server:false, is_force_congested:false, is_used:false}, [1]{idc_type:"SAME_IDC", zone_type:"ReadWrite", replica:{server:"xxx.173:2881", is_dup_replica:false, role:"FOLLOWER", type:"FULL"}, is_merging:false, is_partition_server:false, is_force_congested:false, is_used:false}, [2]{idc_type:"SAME_IDC", zone_type:"ReadWrite", replica:{server:"xxx.183:2881", is_dup_replica:false, role:"FOLLOWER", type:"FULL"}, is_merging:false, is_partition_server:false, is_force_congested:false, is_used:false}], pl:null, ts:0x7f823f588a80, readonly_exist_status:"READONLY_ZONE_NOT_EXIST"}, dummy_entry:0x7f822c980410, server_state_version:6, cur_ss:null, bound_ss:null, lii_ss:null, cluster_resource:{this:0x7f822b1af080, ref_count:50, is_inited:true, cluster_info_key:{cluster_name:{config_string:"xxx"}, cluster_id:0}, cr_state:"CR_AVAIL", version:4, last_access_time_ns:1707124739898815076, deleting_completed_thread_num:0, fetch_rslist_task_count:0, fetch_idc_list_task_count:0, last_idc_list_refresh_time_ns:1707122165422588354, last_rslist_refresh_time_ns:0, server_state_version:6}, client_vc:0x7f822e6a1a40, using_ldg:false, trace_stats:NULL}, transact_count:1, server_trans_stat:0, session_info:{cap:0, ob_server:, version:{common_hot_sys_var_version:0, common_sys_var_version:0, mysql_hot_sys_var_version:0, mysql_sys_var_version:0, hot_sys_var_version:1, sys_var_version:6, user_var_version:1, db_name_version:0, last_insert_id_version:0, sess_info_version:1}, val_hash:{common_hot_sys_var_hash:0, common_cold_sys_var_hash:0, mysql_hot_sys_var_hash:0, mysql_cold_sys_var_hash:0, hot_sys_var_hash:0, cold_sys_var_hash:0, user_var_hash:0}, checksum_switch:1, server_type:1}}, server_vc_=0x7f822d87a670, this=0x7f822b950d10)
[2024-02-05 17:18:59.899204] INFO [PROXY.SS] ob_mysql_server_session.cpp:190 [909028][Y0-00007F8221906960] [lt=81] [dc=0] server session is closing(ss_id=826841, server_sessid=661, server_ip={xxx:2983}, cs_id=109586, proxy_sessid=740971881263490272)
[2024-02-05 17:18:59.899223] INFO [PROXY.CS] ob_mysql_client_session.cpp:94 [909028][Y0-00007F8221906960] [lt=5] [dc=0] client session destroy(cs_id=109586, proxy_sessid=740971881263490272, client_vc=NULL)
[2024-02-05 17:18:59.899237] INFO [PROXY.SM] ob_mysql_sm.cpp:9653 [909028][Y0-00007F8221906960] [lt=4] [dc=0] deallocating sm(sm_id=1785582)
[2024-02-05 17:18:59.902731] INFO [PROXY.SOCK] ob_connection.cpp:369 [909086][Y0-0000000000000000] [lt=17] [dc=0] connection accepted(client={xxx:15882}, server={0.0.0.0:2883}, accepted_fd=178, listen_fd=176)
[2024-02-05 17:18:59.902755] INFO [PROXY.NET] ob_mysql_session_accept.cpp:36 [909028][Y0-00007F822169B950] [lt=3] [dc=0] [ObMysqlSessionAccept:main_event] accepted connection(netvc=0x7f822172b8a0, client_ip={xxx:15882})
[2024-02-05 17:18:59.902767] INFO [PROXY.NET] ob_unix_net_vconnection.cpp:1255 [909028][Y0-00007F822169B950] [lt=5] [dc=0] vip connect(protocol=6, fd=178, vid=0, vaddr={xxx:2883}, caddr={xxx:15882}, daddr={xxx:2883})
[2024-02-05 17:18:59.902775] INFO [PROXY.CS] ob_mysql_client_session.cpp:370 [909028][Y0-00007F822169B950] [lt=7] [dc=0] client session born(cs_id=109587, proxy_sessid=0, is_local_connection=false, client_vc=0x7f822172b8a0, client_fd=178, client_addr="xxx:15882")
[2024-02-05 17:18:59.902785] INFO [PROXY.CS] ob_mysql_client_session.cpp:241 [909028][Y0-00007F822169B950] [lt=5] [dc=0] Starting new transaction using sm(cs_id=109587, get_transact_count()=0, sm_id=1785583)
[2024-02-05 17:18:59.902791] INFO [PROXY.SM] ob_mysql_sm.cpp:521 [909028][Y0-00007F822169B950] [lt=4] [dc=0] the request already in buffer, continue to handle it(buffer len=0, is_auth_rquest=true)
[2024-02-05 17:18:59.902794] WARN [PROXY] get_cluster_name (ob_session_field_mgr.cpp:617) [909028][Y0-00007F822169B950] [lt=3] [dc=0] fail to get cluster name(ret=-4018)
[2024-02-05 17:18:59.902799] WARN [PROXY] get_tenant_name (ob_session_field_mgr.cpp:629) [909028][Y0-00007F822169B950] [lt=5] [dc=0] fail to get tenant name(ret=-4018)
[2024-02-05 17:18:59.903673] INFO [PROXY.SM] ob_mysql_sm.cpp:1979 [909028][Y0-00007F822169B950] [lt=3] [dc=0] final client capability flag in negotiation(last_client_cap=0, is_client_support_ob20=false)
[2024-02-05 17:18:59.903680] INFO [PROXY] ob_vip_tenant_conn.cpp:162 [909028][Y0-00007F822169B950] [lt=5] [dc=0] vip tenant connect is not in vip_tenant_conn_cache(key_name=tp_tenant#xxx|, ret=-4018)
[2024-02-05 17:18:59.903683] INFO [PROXY.SM] ob_mysql_sm.cpp:2563 [909028][Y0-00007F822169B950] [lt=3] [dc=0] client login audit(client_addr={xxx:15882}, hsr.cluster_name_=xxx, hsr.tenant_name_=tp_tenant, hsr.user_name_=root, status="success")
[2024-02-05 17:18:59.903824] INFO [PROXY.SS] ob_mysql_server_session.cpp:106 [909028][Y0-00007F822169B950] [lt=6] [dc=0] server session born(ss_id=826842, server_ip={xxx.173:2881}, cs_id=109587, proxy_sessid=0, server_type=1)
[2024-02-05 17:18:59.903915] INFO [PROXY.TXN] ob_mysql_transact.cpp:4726 [909028][Y0-00007F822169B950] [lt=6] [dc=0] succ to set proxy_sessid(cs_id=109587, proxy_sessid=740971881263490273, server_ip={xxx.173:2881}, ss_id=826842, server_sessid=3221830820, is_proxy_mysql_client=false, ss_fd=185, client_addr="xxx:15882")
[2024-02-05 17:18:59.904530] INFO [PROXY] ob_proxy_session_info_handler.cpp:713 [909028][Y0-00007F822169B950] [lt=10] [dc=0] get global vars version(value=0, version=0)
[2024-02-05 17:18:59.904542] INFO [PROXY] ob_proxy_session_info_handler.cpp:746 [909028][Y0-00007F822169B950] [lt=6] [dc=0] succ to set ob_capability_flag in negotiation(client_cap=0, server_cap=916303, orig_client_cap=0, orig_server_cap=916303, client_support_ob_v2=false, server_support_checksum=true, server_support_ob_v2=true, is_auth_request=true)
[2024-02-05 17:18:59.904551] INFO [PROXY] ob_proxy_session_info_handler.cpp:773 [909028][Y0-00007F822169B950] [lt=5] [dc=0] succ to set checksum_switch(enable_transmission_checksum=1, old_switch=1, is_auth_request=true)
[2024-02-05 17:18:59.904590] INFO [PROXY] ob_session_field_mgr.cpp:1250 [909028][Y0-00007F822169B950] [lt=2] [dc=0] user variable not exist(name=min_cluster_version, ret=-4018)
[2024-02-05 17:18:59.905033] INFO [PROXY] ob_proxy_session_info_handler.cpp:773 [909028][Y0-00007F822169B950] [lt=4] [dc=0] succ to set checksum_switch(enable_transmission_checksum=1, old_switch=1, is_auth_request=false)
[2024-02-05 17:18:59.905541] INFO [PROXY] ob_table_entry_cont.cpp:682 [909002][Y0-00007F822169B950] [lt=25] [dc=0] get table entry from remote succ((newest_table_entry
={{this:0x7f8237a90000, ref_count:1, cr_version:0, cr_id:0, create_time_us:1707124739905537, last_valid_time_us:1707124739905524, last_access_time_us:1707124739905524, last_update_time_us:0, schema_version:0, tenant_version:0, time_for_expired:0, state:"AVAIL"}, this:0x7f8237a90000, is_inited:true, is_dummy_entry:false, is_entry_from_rslist:false, is_empty_entry_allowed:false, is_need_force_flush:false, has_dup_replica:false, cr_id:0, name:{cluster_name:"xxx", tenant_name:"tp_tenant", database_name:"oceanbase", package_name:"", table_name:"__all_binlog_dummy"}, table_id:18446744073709551615, table_type:"UNKNOWN", part_num:0, replica_num:0, buf_len:53, buf_start:0x7f8237a90108, first_pl:{replica_count:1, locations:[[0]{server:"xxx:2983", is_dup_replica:false, role:"FOLLOWER", type:"FULL"}]}})
[2024-02-05 17:18:59.905716] INFO [PROXY.SS] ob_mysql_server_session.cpp:106 [909028][Y0-00007F822169B950] [lt=5] [dc=0] server session born(ss_id=826843, server_ip={xxx:2983}, cs_id=109587, proxy_sessid=740971881263490273, server_type=1)

obproxy didn't bind to listen_port

for example:

bin/obproxy -o enable_strict_kernel_release=False,enable_cluster_checkout=False,syslog_level=DEBUG --listen_port 3306 --prometheus_listen_port 22884 --rs_list "192.168.1.243:3306;192.168.1.244:3306;192.168.1.245:3306"

obproxy.log showed obproxy init succ with port 3306:

[2021-06-21 17:38:05.419882] INFO  [PROXY] ob_proxy_config.cpp:46 [7932][Y0-0] [lt=3] [dc=0] | listen_port                          = 3306
[2021-06-21 17:38:05.422586] INFO  [PROXY] ob_mysql_proxy_server_main.cpp:232 [7932][Y0-0] [lt=6] [dc=0] succ init mysql proxy port by config(proxy_port={10.90.71.13:0}, port=3306})

but actually, it didn't bind to the listen_port, instead it used a random port(after reboot obproxy, the port will change)

image

This bug may caused by these commits:

image

commits before de1c5e3 is ok.

obproxy missing a rpm

The "oceanbase-ce-sql-parser-3.1.0-1.el7.x86_64.rpm" packge is need by obproxy,
however it's missed on the "https://mirrors.aliyun.com/oceanbase/development-kit/el/7/x86_64".

cat obproxy.el7.x86_64.deps
...
[deps]
devdeps-openssl-static-1.0.1e-3.el7.x86_64.rpm
devdeps-libcurl-static-7.29.0-3.el7.x86_64.rpm
devdeps-mariadb-connector-c-3.1.12-3.el7.x86_64.rpm
devdeps-prometheus-cpp-0.8.0-3.el7.x86_64.rpm
devdeps-gtest-1.8.0-3.el7.x86_64.rpm
devdeps-grpc-1.20.1-3.el7.x86_64.rpm

[tools]
obdevtools-gcc-5.2.0-3.el7.x86_64.rpm
obdevtools-bintuils-2.30-3.el7.x86_64.rpm
obdevtools-bison-2.4.1-3.el7.x86_64.rpm
obdevtools-flex-2.5.35-3.el7.x86_64.rpm

[release]
oceanbase-ce-sql-parser-3.1.0-1.el7.x86_64.rpm <--

ObProxy,增加并行模式参数,解决HTAP业务需求

在现实的业务场景中,AP、TP经常是交织在一起的,单纯的通过SQL加HINT是不容易把控的,如果OBProxy可以增加默认开启并行模式,也就是说通过开启并行模式的OBProxy访问oceanbase,都是开启并行的,并行多少也可以调控,而TP模式的业务,还是不开启并行模式,这样能兼容更多的业务场景,对OB的使用可以更加灵活,从而减低开发成本。

[Feature]: obproxy 支持centos9/alam9

Describe your use case

应该是centos9/alma9 的gcc默认版本是11.3.1
gcc --version
gcc (GCC) 11.3.1 20220421 (Red Hat 11.3.1-2)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

lib/allocator/ob_mod_define.cpp:97:37: error: ‘mallinfo mallinfo()’ is deprecated [-Werror=deprecated-declarations]
97 | struct mallinfo info = mallinfo();
| ^
In file included from lib/allocator/ob_mod_define.cpp:15:
/usr/include/malloc.h:113:24: note: declared here
113 | extern struct mallinfo mallinfo (void) __THROW __MALLOC_DEPRECATED;
| ^~~~~~~~
lib/allocator/ob_mod_define.cpp:97:37: error: ‘mallinfo mallinfo()’ is deprecated [-Werror=deprecated-declarations]
97 | struct mallinfo info = mallinfo();
| ^
In file included from lib/allocator/ob_mod_define.cpp:15:
/usr/include/malloc.h:113:24: note: declared here
113 | extern struct mallinfo mallinfo (void) __THROW __MALLOC_DEPRECATED;

../src/obproxy/utils/ob_proxy_lib.h:94:10: fatal error: sys/sysctl.h: No such file or directory
94 | #include <sys/sysctl.h>
| ^~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [Makefile:6220: lib/allocator/ob_malloc.lo] Error 1
cc1plus: all warnings being treated as errors
make[3]: *** [Makefile:6220: lib/allocator/ob_mod_define.lo] Error 1
In file included from ../src/obproxy/iocore/net/ob_inet.h:38,
from ./lib/net/ob_addr.h:22,
from lib/net/ob_addr.cpp:15:
../src/obproxy/utils/ob_proxy_lib.h:94:10: fatal error: sys/sysctl.h: No such file or directory
94 | #include <sys/sysctl.h>
| ^~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [Makefile:6220: lib/net/ob_addr.lo] Error 1
make[3]: Leaving directory '/data/workspace/obproxy-4/src'
make[2]: *** [Makefile:2931: all] Error 2
make[2]: Leaving directory '/data/workspace/obproxy-4/src'
make[1]: *** [Makefile:460: all-recursive] Error 1
make[1]: Leaving directory '/data/workspace/obproxy-4'
make: *** [Makefile:371: all] Error 2

Describe the solution you'd like

希望能兼容下高版本系统 centos9/alam9

Describe alternatives you've considered

No response

Additional context

No response

[Bug]: drop useless code of bt

Check Before Asking

  • Please check the issue list and confirm this bug is encountered for the first time.
  • Please try full text in English and attach precise description.

Environment

No response

Fast Reproduce Steps

in the method "int ObDbConfigProcessor::handle_bt_sdk() "

int ret = OB_SUCCESS;
ret = OB_ERR_UNEXPECTED;
LOG_ERROR("not support beyond trust password", K(ret));
return ret;

Actual Behavior

"ret = OB_SUCCESS" is useless

Expected Behavior

No response

Other Information

No response

不同客户端连接 ob server 显示版本有差异

【产品名称】

3.1.3-OceanBase CE

【产品版本】

[admin@localhost ~]$ obclient --version

obclient Ver 15.1 Distrib 10.4.18-MariaDB, for Linux (x86_64) using readline 5.1

OceanBase 3.1.3
【问题描述】

[admin@localhost ~]$ obclient -h127.0.0.1 -uroot@my_tenant -P2881 -p'root123' -c -A test

Welcome to the OceanBase. Commands end with ; or \g.

Your MySQL connection id is 3221490143

Server version: 5.7.25 OceanBase 3.1.3 (r10100032022041510-a09d3134c10665f03fd56d7f8bdd413b2b771977) (Built Apr 15 2022 02:16:22)




Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.




Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.




MySQL [test]> \q

Bye

[admin@localhost ~]$ obclient -h127.0.0.1 -uroot@my_tenant -P2883 -p'root123' -c -A test

Welcome to the OceanBase. Commands end with ; or \g.

Your MySQL connection id is 25

Server version: 5.6.25 OceanBase 3.1.3 (r10100032022041510-a09d3134c10665f03fd56d7f8bdd413b2b771977) (Built Apr 15 2022 02:16:22)




Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.




Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.




使用obclient和mysql连接不同端口,而显示的server version不同,是什么原因导致?

连接2881端口显示Server version: 5.7.25 OceanBase 3.1.3 (r10100032022041510-a09d3134c10665f03fd56d7f8bdd413b2b771977) (Built Apr 15 2022 02:16:22)

MySQL [information_schema]> select version();

+--------------------+

| version()     |

+--------------------+

| 3.1.3-OceanBase CE |

+--------------------+

1 row in set (0.001 sec)




MySQL [information_schema]> show variables like '%version%';

+-------------------------+------------------------------------------------------------------------------------------------------------+

| Variable_name      | Value                                                   |

+-------------------------+------------------------------------------------------------------------------------------------------------+

| ob_last_schema_version | 0                                                     |

| protocol_version    | 10                                                     |

| tls_version       |                                                      |

| version         | 3.1.3-OceanBase CE                                             |

| version_comment     | OceanBase 3.1.3 (r10100032022041510-a09d3134c10665f03fd56d7f8bdd413b2b771977) (Built Apr 15 2022 02:16:22) |

| version_compile_machine |                                                      |

| version_compile_os   |                                                      |

+-------------------------+------------------------------------------------------------------------------------------------------------+

连接2883端口显示Server version: 5.6.25 OceanBase 3.1.3 (r10100032022041510-a09d3134c10665f03fd56d7f8bdd413b2b771977) (Built Apr 15 2022 02:16:22)

MySQL [test]> select version();

+--------------------+

| version()     |

+--------------------+

| 3.1.3-OceanBase CE |

+--------------------+

1 row in set (0.003 sec)




MySQL [test]> show variables like '%version%';

+-------------------------+------------------------------------------------------------------------------------------------------------+

| Variable_name      | Value                                                   |

+-------------------------+------------------------------------------------------------------------------------------------------------+

| ob_last_schema_version | 0                                                     |

| protocol_version    | 10                                                     |

| tls_version       |                                                      |

| version         | 3.1.3-OceanBase CE                                             |

| version_comment     | OceanBase 3.1.3 (r10100032022041510-a09d3134c10665f03fd56d7f8bdd413b2b771977) (Built Apr 15 2022 02:16:22) |

| version_compile_machine |                                                      |

| version_compile_os   |                                                      |

+-------------------------+------------------------------------------------------------------------------------------------------------+

7 rows in set (0.005 sec)

[Bug]: Obproxy executes the prepare statement and reconnects due to disconnection

Check Before Asking

  • Please check the issue list and confirm this bug is encountered for the first time.
  • Please try full text in English and attach precise description.

Environment

【Product name】obproxy
【Product Version】v3.2.0
[Problem description] After connecting to the cluster through obproxy, execute the prepare statement and report lose connection

Fast Reproduce Steps

select * from oceanbase.__all_virtual_sys_parameter_stat where name="_ob_enable_prepared_statement";

ALTER system set _ob_enable_prepared_statement =true;

MySQL [oceanbase]> select name, data_type, value, scope from oceanbase.__all_virtual_sys_parameter_stat where name='_ob_enable_prepared_statement';

+-------------------------------+-----------+-------+---------+

| name | data_type | value | scope |

+-------------------------------+-----------+-------+---------+

| _ob_enable_prepared_statement | NULL | True | CLUSTER |

| _ob_enable_prepared_statement | NULL | True | CLUSTER |

| _ob_enable_prepared_statement | NULL | True | CLUSTER |

+-------------------------------+-----------+-------+---------+

MySQL [oceanbase]> select version();

+--------------------+

| version() |

+--------------------+

| 3.1.2-OceanBase CE |

+--------------------+

1 row in set (0.00 sec)

Executing prepare through proxy still fails:

MySQL [test]> prepare stmt1 from 'INSERT INTO test.tb1 (id , name ) values ( ? , ? )';

Query OK, 0 rows affected (0.00 sec)

MySQL [test]> prepare stmt1 from 'INSERT INTO test.tb1 (id , name ) values ( ? , ? )';

ERROR 2013 (HY000): Lost connection to MySQL server during query

MySQL [test]> prepare stmt1 from 'INSERT INTO test.tb1 (id , name ) values ( ? , ? )';

ERROR 2006 (HY000): MySQL server has gone away

No connection. Trying to reconnect...

Connection id: 655372

Current database: test

Query OK, 0 rows affected (0.01 sec)

Direct connection to the observer to execute prepare will not cause a broken link:

MySQL [test]> prepare stmt1 from 'INSERT INTO test.tb1 (id , name ) values ( ? , ? )';

Query OK, 0 rows affected (0.01 sec)

MySQL [test]> prepare stmt1 from 'INSERT INTO test.tb1 (id , name ) values ( ? , ? )';

Query OK, 0 rows affected (0.00 sec)

MySQL [test]> prepare stmt1 from 'INSERT INTO test.tb1 (id , name ) values ( ? , ? )';

Query OK, 0 rows affected (0.00 sec)

Actual Behavior

The obproxy_error log content is as follows:

[time],undefined,,,,[clustername]:sys:test,OB_MYSQL,tb1,tb1,OB_MYSQL_COM_QUERY,TEXT_PS_PREPARE,failed,-4016,prepare stmt1 from 'INSERT INTO test.tb1 (id %2C name ) values ( ? %2C ? )',118us,0us,0us,0us,Y0-7F7D0BE0D3A0,,,,0,,Ooooooooooooops

Expected Behavior

No response

Other Information

No response

[Feat.]: support oceanbase-4.1

Check Before Asking

  • Please check the issue list and confirm this feature is encountered for the first time.
  • Please try full text in English and attach precise description.

Description

the latest release version not support the lates oceanbase-4.1

Other Information

No response

[Feat.]: obproxy support connecting to MySQL

Check Before Asking

  • Please check the issue list and confirm this feature is encountered for the first time.
  • Please try full text in English and attach precise description.

Description

OBProxy can connect to both to MySQL and to OceanBase. 

So user can easily to switch from OceanBase to MySQL, or switch from MySQL to OceanBase. 

This is useful to help user migrate from MySQL to OceanBase.

Other Information

No response

[Bug]: <解决nc命令的2883端口探测导致异常登录日志>

Describe the bug

obproxy的nc健康检查,因为不是完备的mysql协议,导致obproxy不停地打Connect error链接错误。
2023-07-04 10:37:33.341153,app,,,,::,OB_MYSQL,,,COM_LOGIN,,failed,-4124,,801us,0us,0us,0us,Y0-7D44730143A0,,,,0,,Connect error
2023-07-04 10:38:33.261336,app,,,,::,OB_MYSQL,,,COM_LOGIN,,failed,-4124,,145us,0us,0us,0us,Y0-7D44730143A0,,,,0,,Connect error
2023-07-04 10:41:48.266505,app,,,,::,OB_MYSQL,,,COM_LOGIN,,failed,-4124,,87us,0us,0us,0us,Y0-7D44722143A0,,,,0,,Connect error
2023-07-04 10:43:33.211679,app,,,,::,OB_MYSQL,,,COM_LOGIN,,failed,-4124,,406us,0us,0us,0us,Y0-7D44730143A0,,,,0,,Connect error
2023-07-04 10:44:33.376363,app,,,,::,OB_MYSQL,,,COM_LOGIN,,failed,-4124,,2813us,0us,0us,0us,Y0-7D44722143A0,,,,0,,Connect error

Environment

  • OS Version and CPU Arch(uname -a):
    所有环境
  • Component Version:

Fast Reproduce Steps(Required)

Steps to reproduce the behavior:

Expected behavior

Actual Behavior

Additional context

[Bug]: fix some description

Check Before Asking

  • Please check the issue list and confirm this bug is encountered for the first time.
  • Please try full text in English and attach precise description.

Environment

No response

Fast Reproduce Steps

in ob_proxy_config.h
DEF_BOOL(enable_sharding, "false", "if enabled means use beyond trust", CFG_NO_NEED_REBOOT, CFG_SECTION_OBPROXY, CFG_VISIBLE_LEVEL_USER);

sharding has nothing to do with beyond trust.

Actual Behavior

DEF_BOOL(enable_sharding, "false", "if enabled means use logic db", CFG_NO_NEED_REBOOT, CFG_SECTION_OBPROXY, CFG_VISIBLE_LEVEL_USER);

Expected Behavior

No response

Other Information

No response

社区版obproxyd stop时 kill -15 会生成core文件

hi:
在调试社区版obproxy执行stop时 kill 默认以信号量15 杀掉obproxy ,等待一段时间后如果还未退出,则会有信号量9 再次kill,但是当前版本会产生core文件。测试了下企业版中同样的执行stop 则不会产生core文件
当前版本是obproxy (OceanBase 3.1.0 1) ,理论上执行stop会正常退出,请官方帮忙看下, 多谢
core文件堆栈如下
#0 0x00007fe3f8ab31f7 in raise () from /lib64/libc.so.6
#1 0x00007fe3f8ab48e8 in abort () from /lib64/libc.so.6
#2 0x0000000001795118 in _Unwind_SetGR ()
#3 0x00000000013868e2 in __gxx_personality_v0 ()
#4 0x00007fe3e5e3da14 in ?? () from /lib64/libgcc_s.so.1
#5 0x00007fe3e5e3dd64 in _Unwind_ForcedUnwind () from /lib64/libgcc_s.so.1
#6 0x00007fe3f9151240 in __pthread_unwind () from /lib64/libpthread.so.0
#7 0x00007fe3f9149865 in sigcancel_handler () from /lib64/libpthread.so.0
#8
#9 0x00007fe3f915198d in accept () from /lib64/libpthread.so.0
#10 0x00000000004ee6ed in oceanbase::obproxy::net::ObServerConnection::accept(oceanbase::obproxy::net::ObConnection*) ()
#11 0x00000000010da2ba in oceanbase::obproxy::net::ObNetAccept::do_blocking_accept() ()
#12 0x00000000010dcd28 in oceanbase::obproxy::net::ObNetAccept::accept_loop_event(int, oceanbase::obproxy::event::ObEvent*) ()
#13 0x00000000010c1101 in oceanbase::obproxy::event::ObEThread::execute() ()
#14 0x00000000004e914e in oceanbase::obproxy::event::spawn_thread_internal(void*) ()
#15 0x00007fe3f914ae25 in start_thread () from /lib64/libpthread.so.0
#16 0x00007fe3f8b7634d in clone () from /lib64/libc.so.6

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.