Code Monkey home page Code Monkey logo

polardb / polardbx-sql Goto Github PK

View Code? Open in Web Editor NEW
1.5K 41.0 314.0 48.98 MB

PolarDB-X is a cloud native distributed SQL Database designed for high concurrency, massive storage, complex querying scenarios.

License: Apache License 2.0

Shell 0.04% FreeMarker 0.22% Java 99.21% CSS 0.02% HTML 0.04% JavaScript 0.25% PLSQL 0.01% TSQL 0.22% Batchfile 0.01% Dockerfile 0.01%
horizontal-scaling distributed-transactions htap enterprise-class cloud-native high-availability mysql high-concurrency massive-datasets relational-database

polardbx-sql's People

Contributors

agapple avatar alibaba-oss avatar arkbriar avatar burhanxz avatar caifeizhi avatar carlostse avatar chenzl25 avatar co63oc avatar erjanmx avatar f-ca7 avatar frank-zsy avatar free6om avatar fuyufjh avatar huoxi-any avatar hustfxj avatar jing118 avatar joecarf avatar lijiu99999 avatar lordess avatar lulu2panpan avatar oldbread3 avatar tennyzhuang avatar wcf2333 avatar wenki-96 avatar wenki96 avatar zeratulllll avatar zhiliyao avatar zhiliyao-polarx avatar zsyty 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  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

polardbx-sql's Issues

AP方面的提升

PolarDB-X本身作为一款HTAP数据库,拥有TP和AP的能力,但主要还是TP,希望PolarDB-X能在AP领域多多发力,减少用户大数据技术的复杂度。生态方面,希望PolarDB-X能向数据湖生态靠近,例如支持Hudi外表等。

执行json_object,结果返回字段顺序会改变,和mariadb,mysql数据库不一样

mysql> SELECT JSON_OBJECT('id', 123, 'name', 'polardb-x');
+---------------------------------------------+
| JSON_OBJECT('id', 123, 'name', 'polardb-x') |
+---------------------------------------------+
| {"name":"polardb-x","id":123} |
+---------------------------------------------+
1 row in set (0.00 sec)

mariadb数据库的结果为,这应该是和mysql数据库一样
MariaDB [(none)]> SELECT JSON_OBJECT('id', 123, 'name', 'polardb-x');
+---------------------------------------------+
| JSON_OBJECT('id', 123, 'name', 'polardb-x') |
+---------------------------------------------+
| {"id": 123, "name": "polardb-x"} |
+---------------------------------------------+
1 row in set (0.000 sec)

Can not omit the 'host' name when create a new account

It may not be a problem, but it’s confusing me today.

When create a new account like create user 'user01' identified by 'user01%%';

it give me :

ERROR 3009 (HY000): [134bec6f3c403000][10.100.141.68:3306][polardbx]com.alibaba.polardbx.druid.sql.ast.expr.SQLIdentifierExpr cannot be cast to com.alibaba.polardbx.druid.sql.dialect.mysql.ast.expr.MySqlUserName

(Thanks for the tip)Which I found the log in cn pod (/home/admin/drds-server/logs/polardbx/tddl.log) shows:

2021-10-28 16:05:19.691 [ServerExecutor-bucket-0-17-thread-449] WARN  com.alibaba.polardbx.server.ServerConnection - [user=polardbx_root,host=127.0.0.1,port=57220,schema=polardbx]  [TDDL] [ERROR-CODE: 3009][134bec6f3c403000] SQL: null, tddl version: 5.4.12-20211018
java.lang.ClassCastException: com.alibaba.polardbx.druid.sql.ast.expr.SQLIdentifierExpr cannot be cast to com.alibaba.polardbx.druid.sql.dialect.mysql.ast.expr.MySqlUserName
        at com.alibaba.polardbx.server.handler.privileges.polar.PolarCreateUserHandler.checkAndGetGrantees(PolarCreateUserHandler.java:87)
        at com.alibaba.polardbx.server.handler.privileges.polar.PolarCreateUserHandler.doHandle(PolarCreateUserHandler.java:104)
        at com.alibaba.polardbx.server.handler.privileges.polar.AbstractPrivilegeCommandHandler.handle(AbstractPrivilegeCommandHandler.java:66)
        at com.alibaba.polardbx.server.handler.privileges.polar.PrivilegeCommandHandlers.handle(PrivilegeCommandHandlers.java:98)
        at com.alibaba.polardbx.server.ServerQueryHandler.executeStatement(ServerQueryHandler.java:187)
        at com.alibaba.polardbx.server.ServerQueryHandler.queryRaw(ServerQueryHandler.java:111)
        at com.alibaba.polardbx.net.FrontendConnection.query(FrontendConnection.java:474)
        at com.alibaba.polardbx.net.handler.FrontendCommandHandler.handle(FrontendCommandHandler.java:65)
        at com.alibaba.polardbx.net.FrontendConnection.lambda$handleData$0(FrontendConnection.java:746)
        at com.alibaba.polardbx.common.utils.thread.RunnableWithCpuCollector.run(RunnableWithCpuCollector.java:49)
        at com.alibaba.polardbx.common.utils.thread.ServerThreadPool$RunnableAdapter.run(ServerThreadPool.java:744)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

But it works well when take the host name part : create user 'user01'@'%' identified by 'user01%%';

In MySQL CREATE USER Statement

The host name part of the account name, if omitted, defaults to '%'.

It’s better to put it in a document, if that’s what the design is 😄 .

[PXC-9001][ERR_GMS_GENERIC] failed to create default db

2021-12-01 09:48:07.466 [main] ERROR com.alibaba.polardbx.CobarConfig - [] Failed to init cobar server.
com.alibaba.polardbx.common.exception.TddlRuntimeException: ERR-CODE: [PXC-9001][ERR_GMS_GENERIC] failed to create default db, err is ERR-CODE: [PXC-9001][ERR_GMS_GENERIC] No found any storage inst of metaDb. .
at com.alibaba.polardbx.gms.topology.DbTopologyManager.createInternalSystemDbIfNeed(DbTopologyManager.java:223)
at com.alibaba.polardbx.gms.topology.SystemDbHelper.checkOrCreateDefaultDb(SystemDbHelper.java:61)
at com.alibaba.polardbx.gms.metadb.MetaDbDataSource.initSystemDbIfNeed(MetaDbDataSource.java:420)
at com.alibaba.polardbx.config.loader.ServerLoader.initPolarDbXComponents(ServerLoader.java:248)
at com.alibaba.polardbx.config.loader.ServerLoader.load(ServerLoader.java:181)
at com.alibaba.polardbx.config.loader.ServerLoader.doInit(ServerLoader.java:91)
at com.alibaba.polardbx.common.model.lifecycle.AbstractLifecycle.init(AbstractLifecycle.java:43)
at com.alibaba.polardbx.CobarConfig.initCobarConfig(CobarConfig.java:68)
at com.alibaba.polardbx.CobarConfig.(CobarConfig.java:61)
at com.alibaba.polardbx.CobarServer.(CobarServer.java:141)
at com.alibaba.polardbx.CobarServer.(CobarServer.java:95)
at com.alibaba.polardbx.server.TddlLauncher.main(TddlLauncher.java:82)
Caused by: com.alibaba.polardbx.common.exception.TddlRuntimeException: ERR-CODE: [PXC-9001][ERR_GMS_GENERIC] No found any storage inst of metaDb.
at com.alibaba.polardbx.gms.topology.DbTopologyManager.createInternalSystemDbIfNeed(DbTopologyManager.java:208)
... 11 common frames omitted
Uploading PXC-9001 数据库.txt…

welcome to native compatible openanolis https://openanolis.cn/

https://openanolis.cn/
龙蜥操作系统(Anolis OS) 版本秉承与国际主流Linux厂商发行版 100% 兼容的原则,且提供配套的迁移工具,助力用户完美平滑地迁移至龙蜥操作系统(Anolis OS),满足CentOS停服后的各领域、各行业用户的使用习惯和需求。在硬件生态方面通过和Intel 及国内芯片厂商的合作,支持Intel、海光、兆芯、飞腾、鲲鹏等一系列芯片平台,进行软、硬一体的优化,充分发挥硬件平台的性能。

[bug] A security vulnerability for log4j < 2.15

There is a security vulnerability for log4j < 2.15. The log4j version should be updated to latest.

Does the bug affect the image galaxysql, galaxyengine and galaxycdc?

Look forward to your reply~

Let the 32 databases limit configurable

Try to deploy LMS product with polardbx as it database, We need to create database over 100 schools.
Then I have been told about that the limit about number of databases is 32, ant Can't adjust by config file.
Wish this limit can be configurable and please tell me why we really need this limitation?

[ASoC]PolarDB-X支持DBLink

题目描述:

DBLink功能允许在一个数据库连接另一个远程的数据库。DBLink创建好之后,可以像访问本地数据库一样访问远程数据库(例如本地库与远程库中表的JOIN等操作)。

任务目标:

  1. 支持PolarDB-X创建到MySQL与PolarDB-X的DBLink
  2. 支持对于远程库的DML、DQL、DDL操作
  3. 尽可能的下推更多算子到远程库
  4. 支持相关的系统视图、权限管理等

项目技术要求:

熟悉Java语言、了解数据库内核基本结构和DBLink基本过程

题目难度

导师信息
Sun Mengshi,ASoC Mentor, PolarDB-X Committer.
[email protected](联系导师请附上个人简历)

Fix some problem when login

  1. Unnecessary to reload inst config and variable config, because the system will sync automatically.
  2. User can try to login with wrong password or username repeatedly forever, because the variable(passwordMaxErrorCount) have no effect.

I ran benchmark but got trapped in a trouble, error message would be pasted followed.

alter table bmsql_district add constraint d_warehouse_fkey
foreign key (d_w_id)
references bmsql_warehouse (w_id);
[134bc68428001000][192.168.10.221:10413][db_test]Failed to execute the DDL task. Caused by: ERR-CODE: [PXC-4636][ERR_DDL_JOB_ERROR] Not all physical DDLs have been executed successfully: 1 expected, 0 done, 1 failed. Caused by: ERR-CODE: [PXC-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'DB_TEST_SINGLE_GROUP' ATOM 'dskey_db_test_single_group#pxc_test-dn-0#192.168.10.221-17298#db_test_single': Failed to open the referenced table 'bmsql_warehouse' ;ERR-CODE: [PXC-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'DB_TEST_SINGLE_GROUP' ATOM 'dskey_db_test_single_group#pxc_test-dn-0#192.168.10.221-17298#db_test_single': Failed to open the referenced table 'bmsql_warehouse' .
alter table bmsql_customer add constraint c_district_fkey
foreign key (c_w_id, c_d_id)
references bmsql_district (d_w_id, d_id);
[134bc6855f801000][192.168.10.221:10413][db_test]Failed to execute the DDL task. Caused by: ERR-CODE: [PXC-4636][ERR_DDL_JOB_ERROR] Not all physical DDLs have been executed successfully: 1 expected, 0 done, 1 failed. Caused by: ERR-CODE: [PXC-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'DB_TEST_SINGLE_GROUP' ATOM 'dskey_db_test_single_group#pxc_test-dn-0#192.168.10.221-17298#db_test_single': Failed to open the referenced table 'bmsql_district' ;ERR-CODE: [PXC-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'DB_TEST_SINGLE_GROUP' ATOM 'dskey_db_test_single_group#pxc_test-dn-0#192.168.10.221-17298#db_test_single': Failed to open the referenced table 'bmsql_district' .
alter table bmsql_history add constraint h_customer_fkey
foreign key (h_c_w_id, h_c_d_id, h_c_id)
references bmsql_customer (c_w_id, c_d_id, c_id);
[134bc68699001000][192.168.10.221:10413][db_test]Failed to execute the DDL task. Caused by: ERR-CODE: [PXC-4636][ERR_DDL_JOB_ERROR] Not all physical DDLs have been executed successfully: 1 expected, 0 done, 1 failed. Caused by: ERR-CODE: [PXC-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'DB_TEST_SINGLE_GROUP' ATOM 'dskey_db_test_single_group#pxc_test-dn-0#192.168.10.221-17298#db_test_single': Failed to open the referenced table 'bmsql_customer' ;ERR-CODE: [PXC-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'DB_TEST_SINGLE_GROUP' ATOM 'dskey_db_test_single_group#pxc_test-dn-0#192.168.10.221-17298#db_test_single': Failed to open the referenced table 'bmsql_customer' .
alter table bmsql_history add constraint h_district_fkey
foreign key (h_w_id, h_d_id)
references bmsql_district (d_w_id, d_id);
[134bc687cf401000][192.168.10.221:10413][db_test]ERR-CODE: [PXC-4644][ERR_PENDING_DDL_JOB_EXISTS] Another DDL job '1390423191423291392' with operation 'ALTER_TABLE' is pending on db_test.bmsql_history in db_test. Please use SHOW DDL to check it, and then recover or rollback it using RECOVER DDL or ROLLBACK DDL, or just remove it using REMOVE DDL if you confirm that the pending job can be discarded.
alter table bmsql_new_order add constraint no_order_fkey
foreign key (no_w_id, no_d_id, no_o_id)
references bmsql_oorder (o_w_id, o_d_id, o_id);
[134bc688d1001000][192.168.10.221:10413][db_test]Failed to execute the DDL task. Caused by: ERR-CODE: [PXC-4636][ERR_DDL_JOB_ERROR] Not all physical DDLs have been executed successfully: 1 expected, 0 done, 1 failed. Caused by: ERR-CODE: [PXC-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'DB_TEST_SINGLE_GROUP' ATOM 'dskey_db_test_single_group#pxc_test-dn-0#192.168.10.221-17298#db_test_single': Failed to open the referenced table 'bmsql_oorder' ;ERR-CODE: [PXC-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'DB_TEST_SINGLE_GROUP' ATOM 'dskey_db_test_single_group#pxc_test-dn-0#192.168.10.221-17298#db_test_single': Failed to open the referenced table 'bmsql_oorder' .
alter table bmsql_oorder add constraint o_customer_fkey
foreign key (o_w_id, o_d_id, o_c_id)
references bmsql_customer (c_w_id, c_d_id, c_id);
[134bc68a08001000][192.168.10.221:10413][db_test]Failed to execute the DDL task. Caused by: ERR-CODE: [PXC-4636][ERR_DDL_JOB_ERROR] Not all physical DDLs have been executed successfully: 1 expected, 0 done, 1 failed. Caused by: ERR-CODE: [PXC-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'DB_TEST_SINGLE_GROUP' ATOM 'dskey_db_test_single_group#pxc_test-dn-0#192.168.10.221-17298#db_test_single': Failed to open the referenced table 'bmsql_customer' ;ERR-CODE: [PXC-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'DB_TEST_SINGLE_GROUP' ATOM 'dskey_db_test_single_group#pxc_test-dn-0#192.168.10.221-17298#db_test_single': Failed to open the referenced table 'bmsql_customer' .
alter table bmsql_order_line add constraint ol_order_fkey
foreign key (ol_w_id, ol_d_id, ol_o_id)
references bmsql_oorder (o_w_id, o_d_id, o_id);
[134bc68b3f001000][192.168.10.221:10413][db_test]Failed to execute the DDL task. Caused by: ERR-CODE: [PXC-4636][ERR_DDL_JOB_ERROR] Not all physical DDLs have been executed successfully: 1 expected, 0 done, 1 failed. Caused by: ERR-CODE: [PXC-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'DB_TEST_SINGLE_GROUP' ATOM 'dskey_db_test_single_group#pxc_test-dn-0#192.168.10.221-17298#db_test_single': Failed to open the referenced table 'bmsql_oorder' ;ERR-CODE: [PXC-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'DB_TEST_SINGLE_GROUP' ATOM 'dskey_db_test_single_group#pxc_test-dn-0#192.168.10.221-17298#db_test_single': Failed to open the referenced table 'bmsql_oorder' .
alter table bmsql_order_line add constraint ol_stock_fkey
foreign key (ol_supply_w_id, ol_i_id)
references bmsql_stock (s_w_id, s_i_id);
[134bc68c77001000][192.168.10.221:10413][db_test]ERR-CODE: [PXC-4644][ERR_PENDING_DDL_JOB_EXISTS] Another DDL job '1390423211413344256' with operation 'ALTER_TABLE' is pending on db_test.bmsql_order_line in db_test. Please use SHOW DDL to check it, and then recover or rollback it using RECOVER DDL or ROLLBACK DDL, or just remove it using REMOVE DDL if you confirm that the pending job can be discarded.
alter table bmsql_stock add constraint s_warehouse_fkey
foreign key (s_w_id)
references bmsql_warehouse (w_id);
[134bc68d78801000][192.168.10.221:10413][db_test]Failed to execute the DDL task. Caused by: ERR-CODE: [PXC-4636][ERR_DDL_JOB_ERROR] Not all physical DDLs have been executed successfully: 1 expected, 0 done, 1 failed. Caused by: ERR-CODE: [PXC-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'DB_TEST_SINGLE_GROUP' ATOM 'dskey_db_test_single_group#pxc_test-dn-0#192.168.10.221-17298#db_test_single': Failed to open the referenced table 'bmsql_warehouse' ;ERR-CODE: [PXC-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'DB_TEST_SINGLE_GROUP' ATOM 'dskey_db_test_single_group#pxc_test-dn-0#192.168.10.221-17298#db_test_single': Failed to open the referenced table 'bmsql_warehouse' .
alter table bmsql_stock add constraint s_item_fkey
foreign key (s_i_id)
references bmsql_item (i_id);
[134bc68eaf001000][192.168.10.221:10413][db_test]ERR-CODE: [PXC-4644][ERR_PENDING_DDL_JOB_EXISTS] Another DDL job '1390423220942802944' with operation 'ALTER_TABLE' is pending on db_test.bmsql_stock in db_test. Please use SHOW DDL to check it, and then recover or rollback it using RECOVER DDL or ROLLBACK DDL, or just remove it using REMOVE DDL if you confirm that the pending job can be discarded.

polardb-x支持udf

数据库中 SQL 函数可以大致分为以下几类:内部函数、系统生成的函数、用 户定义的函数(UDF),其中用户定义的函数是指由用户通过 CREATE FUNCTION 显示创建并命名的函数 ,其语义也由用户自己确定,能够在一定程度上扩展数 据库的功能。 目标效果:

  • PolarDB-X 支持 CREATE FUNCTION 创建 UDF
  • 支持一些系统视图,可以方便查询和管理已注册 UDF

pxd layout failed.docker.errors.ContainerError: Command '/init' in image 'polardbx/polardbx-init:latest' returned non-zero exit status 255: b''

os info

[root@VM ~]# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)

[root@VM ~]# uname -a
Linux VM 3.10.0-1127.19.1.el7.x86_64 #1 SMP Tue Aug 25 17:23:54 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

[root@VM ~]# python3 --version
Python 3.6.8

run pxd layout output

Digest: sha256:5c0b19954c18fd2347eee46dffd82c4babf7e57b2e405d8b4ccb4d5a647c19a7
Status: Downloaded newer image for docker.io/polardbx/xstore-tools:latest
Processing  [#########---------------------------]   25%    create gms node
Processing  [############------------------------]   33%    create gms db and tables
Processing  [###############---------------------]   41%    create PolarDB-X root account
Processing  [##################------------------]   50%    create dn
Processing  [#####################---------------]   58%    register dn to gms
Processing  [########################------------]   66%    create cn
--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/deployer/decorator/decorators.py", line 32, in wrapper
    ret = func(*args, **kw)
  File "/usr/local/lib/python3.6/site-packages/deployer/pxc/polardbx_cluster.py", line 380, in _create_cn_containers
    name=self.pxc_name + '-cn-init-' + ''.join(secrets.choice(string.ascii_letters) for i in range(4)))
  File "/usr/local/lib/python3.6/site-packages/docker/models/containers.py", line 841, in run
    container, exit_status, command, image, out
docker.errors.ContainerError: Command '/init' in image 'polardbx/polardbx-init:latest' returned non-zero exit status 255: b''

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/deployer/util/sqlite_manager.py", line 35, in execute_update
    cursor.execute(sql)
sqlite3.OperationalError: near "' in image '": syntax error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/logging/handlers.py", line 71, in emit
    if self.shouldRollover(record):
  File "/usr/local/lib/python3.6/logging/handlers.py", line 187, in shouldRollover
    msg = "%s\n" % self.format(record)
  File "/usr/local/lib/python3.6/logging/__init__.py", line 840, in format
    return fmt.format(record)
  File "/usr/local/lib/python3.6/logging/__init__.py", line 577, in format
    record.message = record.getMessage()
  File "/usr/local/lib/python3.6/logging/__init__.py", line 338, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
  File "/usr/local/bin/pxd", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1668, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/deployer/pxd.py", line 40, in tryout
    create_tryout_pxc(name, cn_replica, cn_version, dn_replica, dn_version, cdc_replica, cdc_version)
  File "/usr/local/lib/python3.6/site-packages/deployer/pxc/polardbx_manager.py", line 35, in create_tryout_pxc
    pxc.create()
  File "/usr/local/lib/python3.6/site-packages/deployer/pxc/polardbx_cluster.py", line 143, in create
    result = create_task()
  File "/usr/local/lib/python3.6/site-packages/deployer/decorator/decorators.py", line 37, in wrapper
    update_polardbx_record(pxc, ex)
  File "/usr/local/lib/python3.6/site-packages/deployer/decorator/decorators.py", line 52, in update_polardbx_record
    SQLiteManager.execute_update(sql)
  File "/usr/local/lib/python3.6/site-packages/deployer/util/sqlite_manager.py", line 38, in execute_update
    logger.error("execute update for xdb failed, xdb: %s, sql: %s", SQLiteManager.db_file, sql, e)
Message: 'execute update for xdb failed, xdb: %s, sql: %s'
Arguments: ('/root/.pxd/polardbx.db', "replace into polardbx_cluster ('id', 'gmt_created', 'gmt_modified', 'pxc_name', 'pxc_status', 'cn_replica', 'cn_version', 'dn_replica', 'dn_version', 'leader_only', 'root_account', 'root_password', 'details', 'cdc_replica', 'cdc_version') values (NULL, date('now'), date('now'), 'pxc-tryout', 'failed', '1', 'latest', '1', 'latest', 'True', 'polardbx_root', 'qdWlIjKB', 'Command '/init' in image 'polardbx/polardbx-init:latest' returned non-zero exit status 255: b''', '1', 'latest')", OperationalError('near "\' in image \'": syntax error',))
--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/deployer/decorator/decorators.py", line 32, in wrapper
    ret = func(*args, **kw)
  File "/usr/local/lib/python3.6/site-packages/deployer/pxc/polardbx_cluster.py", line 380, in _create_cn_containers
    name=self.pxc_name + '-cn-init-' + ''.join(secrets.choice(string.ascii_letters) for i in range(4)))
  File "/usr/local/lib/python3.6/site-packages/docker/models/containers.py", line 841, in run
    container, exit_status, command, image, out
docker.errors.ContainerError: Command '/init' in image 'polardbx/polardbx-init:latest' returned non-zero exit status 255: b''

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/deployer/util/sqlite_manager.py", line 35, in execute_update
    cursor.execute(sql)
sqlite3.OperationalError: near "' in image '": syntax error

ERROR jTPCCTData : [144044c5e7001000-8][10.16.9.12:10069][tpcc1]ERR-CODE: [PXC-10001][ERR_X_PROTOCOL_CLIENT] XDataSource to [email protected]:44881 ERR-CODE: [PXC-10003][ERR_X_PROTOCOL_CONNECTION] XClientPool to [email protected]:44881 get XConnection timeout. 5000000000ns

VERSION

About PolarDB-X

deployed by pxd
pxd version: 0.3.0
polardbx/galaxysql latest "Created": "2022-04-28T11:05:22.088619Z"

About ENV

CentOS Linux release 7.9.2009 (Core)
Python 3.6.8
Docker version 20.10.14, build a224086

Problem

After use Benchmarksql build 1,000 warehouses ,start runBenchmark.
error occurs

11:00:45,448 [Thread-7] ERROR  jTPCCTData : Unexpected SQLException in NEW_ORDER
11:00:45,448 [Thread-7] ERROR  jTPCCTData : [144044c5e7001000-8][10.16.9.12:10069][tpcc1]ERR-CODE: [PXC-10001][ERR_X_PROTOCOL_CLIENT] XDataSource to [email protected]:44881 ERR-CODE: [PXC-10003][ERR_X_PROTOCOL_CONNECTION] XClientPool to [email protected]:44881 get XConnection timeout. 5000000000ns
java.sql.SQLException: [144044c5e7001000-8][10.16.9.12:10069][tpcc1]ERR-CODE: [PXC-10001][ERR_X_PROTOCOL_CLIENT] XDataSource to [email protected]:44881 ERR-CODE: [PXC-10003][ERR_X_PROTOCOL_CONNECTION] XClientPool to [email protected]:44881 get XConnection timeout. 5000000000ns
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2484)
	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1858)
	at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1966)
	at jTPCCTData.executeNewOrder(jTPCCTData.java:430)
	at jTPCCTData.execute(jTPCCTData.java:95)
	at jTPCCTerminal.executeTransactions(jTPCCTerminal.java:261)
	at jTPCCTerminal.run(jTPCCTerminal.java:88)
	at java.lang.Thread.run(Thread.java:748)

Try to fix

  1. restart cdc,dn,cn,gms of PolarDB-x in docker —— Errors still occur
  2. related #34 ,check variable —— galaxyXProtocol=1
[admin@centos71 drds-server]$ cat conf/server.properties
serverPort=3306
managerPort=3406
rpcPort=9090
charset=utf-8
processors=4
processorHandler=16
processorKillExecutor=128
timerExecutor=8
managerExecutor=256
serverExecutor=1024
idleTimeout=
trustedIps=127.0.0.1
slowSqlTime=1000
maxConnection=20000
allowManagerLogin=1
allowCrossDbQuery=true
galaxyXProtocol=1
metaDbAddr=127.0.0.1:3306
metaDbXprotoPort=13306
metaDbUser=my_polarx
metaDbName=polardbx_meta_db_polardbx
instanceId=polardbx-polardbx
  1. Telnet —— network & port alive
    image

galaxysql process crashed during sysbench tests

I deployed a PolarDB-X clusters using the PXD tool,the galaxysql process crashed during sysbench tests.

/home/admin/drds-server/logs/tddl/XLog.log

2021-10-28 17:14:00.403 ERROR ERR-CODE: [PXC-10004][ERR_X_PROTOCOL_RESULT] Fatal error when fetch data: Expectation failed: no_error HY000
com.alibaba.polardbx.common.exception.TddlRuntimeException: ERR-CODE: [PXC-10004][ERR_X_PROTOCOL_RESULT] Fatal error when fetch data: Expectation failed: no_error HY000
at com.alibaba.polardbx.rpc.result.XResult.internalFetchOneObject(XResult.java:921)
at com.alibaba.polardbx.rpc.result.XResult.waitFinish(XResult.java:508)
at com.alibaba.polardbx.rpc.client.XSession.flushIgnorable(XSession.java:889)
at com.alibaba.polardbx.rpc.pool.XConnection.close(XConnection.java:112)
at com.alibaba.polardbx.gms.metadb.MetaDbDataSource.initTsoServicesX(MetaDbDataSource.java:132)
at com.alibaba.polardbx.gms.metadb.MetaDbDataSource.initXDataSourceByJdbcProps(MetaDbDataSource.java:170)
at com.alibaba.polardbx.gms.metadb.MetaDbDataSource.initMetaDbDataSource(MetaDbDataSource.java:181)
at com.alibaba.polardbx.gms.metadb.MetaDbDataSource.doInit(MetaDbDataSource.java:121)
at com.alibaba.polardbx.common.model.lifecycle.AbstractLifecycle.init(AbstractLifecycle.java:43)
at com.alibaba.polardbx.gms.metadb.MetaDbDataSource.getInstance(MetaDbDataSource.java:462)
at com.alibaba.polardbx.gms.metadb.MetaDbDataSource.initMetaDbDataSource(MetaDbDataSource.java:488)
at com.alibaba.polardbx.config.loader.ServerLoader.initPolarDbXComponents(ServerLoader.java:207)
at com.alibaba.polardbx.config.loader.ServerLoader.load(ServerLoader.java:181)
at com.alibaba.polardbx.config.loader.ServerLoader.doInit(ServerLoader.java:91)
at com.alibaba.polardbx.common.model.lifecycle.AbstractLifecycle.init(AbstractLifecycle.java:43)
at com.alibaba.polardbx.CobarConfig.initCobarConfig(CobarConfig.java:68)
at com.alibaba.polardbx.CobarConfig.(CobarConfig.java:61)
at com.alibaba.polardbx.CobarServer.(CobarServer.java:141)
at com.alibaba.polardbx.CobarServer.(CobarServer.java:95)
at com.alibaba.polardbx.server.TddlLauncher.main(TddlLauncher.java:82)

[ASoC]PolarDB-X Operator 混沌测试实践

题目描述:

对于分布式数据库,稳定性和容错是最基本的要求之一。但是面对复杂多变的运行环境,我们无法预测集群下一秒会发生什么,如何在这样的环境下保证用户数据的安全是个无法避免的问题,而混沌测试正是为了解决这一问题而生。

Chaos Mesh 是一个通用的混沌测试解决方案,为 Kubernetes 提供了全方位的故障注入方法,涵盖了 Pod、网络、文件系统甚至内核的故障。PolarDB-X Operator 是 Kubernetes 上的PolarDB-X 集群运维系统,支持生命周期管理、备份恢复、监控等能力。

任务目标:

本任务希望基于 PolarDB-X Operator 和 Chaos Mesh,构建面向分布式数据库PolarDB-X的混沌测试框架,通过主动注入故障的方式,一方面有助于发现潜在的问题并快速修复,另一方面也能验证 PolarDB-X 的稳定性与容错能力。

项目技术要求:

熟悉Golang、Chaos Mesh,了解断网、弱网等常见系统故障

题目难度

导师信息
Wu Di,@vettalwu,ASoC Mentor, PolarDB-X Committer.
[email protected](联系导师请附上个人简历)

Quick-Start cluster always in Creating state

I have created my own cluster last week. And I destroyed it.
When I try to restart a new cluster by the same yaml script, It's stay in creating state.
And Then I try to create a quick-start cluster in another k8s env, It's also in Creating PHASE forever.
Need you help, thanks!

Extra space char at end of metaDbUser=my_polarx in server.properties

Extra space char at end of metaDbUser=my_polarx in server.properties, leads to connect to metadb failed:

Caused by: java.sql.SQLException: Access denied for user 'my_polarx '@'192.168.1.131' (using password: YES)

Following quickstart-development.md

At Final Step, Run PolarDB-X:
bin/startup.sh -P asdf1234ghjk5678

Error at meta-db.log
2021-10-27 17:44:12.376 ERROR ERR-CODE: [PXC-9001][ERR_GMS_GENERIC] Failed to create connection to [jdbc:mysql://192.168.1.131:8811/polardbx_meta_db_polardbx?allowMultiQueries=true&allowPublicKeyRetrieval=true&autoReconnect=false&characterEncoding=utf8&connectTimeout=10000&failOverReadOnly=false&rewriteBatchedStatements=true&socketTimeout=900000&useServerPrepStmts=false&useSSL=false&useUnicode=true].
com.alibaba.polardbx.common.exception.TddlRuntimeException: ERR-CODE: [PXC-9001][ERR_GMS_GENERIC] Failed to create connection to [jdbc:mysql://192.168.1.131:8811/polardbx_meta_db_polardbx?allowMultiQueries=true&allowPublicKeyRetrieval=true&autoReconnect=false&characterEncoding=utf8&connectTimeout=10000&failOverReadOnly=false&rewriteBatchedStatements=true&socketTimeout=900000&useServerPrepStmts=false&useSSL=false&useUnicode=true].
at com.alibaba.polardbx.gms.util.GmsJdbcUtil.createConnection(GmsJdbcUtil.java:109)
at com.alibaba.polardbx.gms.util.GmsJdbcUtil.buildJdbcConnection(GmsJdbcUtil.java:94)
at com.alibaba.polardbx.gms.metadb.MetaDbDataSource.initMetaDbAvaliableAddr(MetaDbDataSource.java:256)
at com.alibaba.polardbx.gms.metadb.MetaDbDataSource.doInit(MetaDbDataSource.java:119)
at com.alibaba.polardbx.common.model.lifecycle.AbstractLifecycle.init(AbstractLifecycle.java:43)
at com.alibaba.polardbx.gms.metadb.MetaDbDataSource.getInstance(MetaDbDataSource.java:462)
at com.alibaba.polardbx.gms.metadb.MetaDbDataSource.initMetaDbDataSource(MetaDbDataSource.java:488)
at com.alibaba.polardbx.config.loader.ServerLoader.initPolarDbXComponents(ServerLoader.java:207)
at com.alibaba.polardbx.config.loader.ServerLoader.load(ServerLoader.java:181)
at com.alibaba.polardbx.config.loader.ServerLoader.doInit(ServerLoader.java:91)
at com.alibaba.polardbx.common.model.lifecycle.AbstractLifecycle.init(AbstractLifecycle.java:43)
at com.alibaba.polardbx.CobarConfig.initCobarConfig(CobarConfig.java:68)
at com.alibaba.polardbx.CobarConfig.(CobarConfig.java:61)
at com.alibaba.polardbx.CobarServer.(CobarServer.java:141)
at com.alibaba.polardbx.CobarServer.(CobarServer.java:95)
at com.alibaba.polardbx.server.TddlLauncher.main(TddlLauncher.java:82)
Caused by: java.sql.SQLException: Access denied for user 'my_polarx '@'192.168.1.131' (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3933)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3869)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:864)
at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1707)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1217)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2189)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2220)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2015)
at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:768)
at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:403)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:385)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:323)
at com.alibaba.polardbx.gms.util.GmsJdbcUtil.getConnectionByDriver(GmsJdbcUtil.java:135)
at com.alibaba.polardbx.gms.util.GmsJdbcUtil.createConnection(GmsJdbcUtil.java:105)
... 15 common frames omitted
2021-10-27 17:44:12.379 WARN [TDDL] Fail to fetch xport from node[null] type -1, and set xport=-1, tddl version: 5.4.12-20211027

conf/server.properties
serverPort=3306
managerPort=3406
rpcPort=9090
charset=utf-8
processors=4
processorHandler=16
processorKillExecutor=128
timerExecutor=8
managerExecutor=256
serverExecutor=1024
idleTimeout=
trustedIps=192.168.1.131
slowSqlTime=1000
maxConnection=20000
allowManagerLogin=1
allowCrossDbQuery=true
galaxyXProtocol=1
metaDbAddr=192.168.1.131:8811
metaDbXprotoPort=28811
metaDbUser=my_polarx
metaDbName=polardbx_meta_db_polardbx
instanceId=polardbx-polardbx
metaDbPasswd=n8zArSMVJvlFXBDZ=

mysqlbinlog基于cdc全局binlog恢复报Not supported variable for now 'pseudo_thread_id'

用mysqlbinlog基于全局binlog恢复时报错,之后的insert 表数据sql未执行,数据不能恢复,示例:
mysql -f -hxxx -Pxxx -upolardbx_root -pxxx testdb<testdb.sql
ERROR 1193 (HY000) at line 14: [147a79b9c8003000][192.168.110.21:9540][testdb]Not supported variable for now 'pseudo_thread_id'
ERROR 3009 (HY000) at line 18: [147a79b9cac03000][192.168.110.21:9540][testdb]ERR-CODE: [PXC-4500][ERR_PARSER] statement com.alibaba.polardbx.druid.sql.dialect.mysql.ast.statement.MySqlHintStatement not supported

testdb.sql截取后的前部份内容如下(mysqlbinlog -v --base64-output=decode-rows --skip-gtids=true -d testdb --start-position=2907258 --stop-position=3243742 /tmp/binlog.000001 > testdb.sql):
/!50616 SET @@SESSION.GTID_NEXT='AUTOMATIC'//!/;

at 2906355

#220615 13:09:49 server id 1842087586 end_log_pos 2906999 CRC32 0x5afb9f3c Query thread_id=1 exec_time=1655432947 error_code=0
use testdb/!/;
SET TIMESTAMP=1655269789/!/;
SET @@session.pseudo_thread_id=1/!/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/!/;
SET @@session.sql_mode=1142947872/!/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/!/;
/!\C utf8mb3 //!/;
SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=33/!/;
SET @@session.time_zone='SYSTEM'/!/;
SET @@session.lc_time_names=0/!/;
SET @@session.collation_database=DEFAULT/!/;

POLARX_ORIGIN_SQL=CREATE TABLE t1 ( id bigint(11) NOT NULL AUTO_INCREMENT, name varchar(255) DEFAULT NULL, score bigint(11) DEFAULT NULL, PRIMA

RY KEY (id) ) ENGINE = InnoDB DEFAULT CHARSET = utf8 PARTITION BY HASH (id) PARTITIONS 9# POLARX_TSO=694270470023177836814737699134400184320000000000000000
create table t1 ( id bigint(11) not null auto_increment, name varchar(255) default null, score bigint(11) default null, primary key (id) ) engi
ne = innodb default charset = utf8 default character set = utf8 default collate = utf8_general_ci/!/;

at 2906999

at 2907082

#220615 13:09:49 server id 1842087586 end_log_pos 2907137 CRC32 0x4e1bf385 Query thread_id=0 exec_time=0 error_code=0
SET TIMESTAMP=1655269789/!/;
BEGIN
/!/;

at 2907137

at 2907207

#220615 13:09:49 server id 1842087586 end_log_pos 2907258 CRC32 0x010dbfa8 Table_map: testdb.t1 mapped to number 5

at 2907258

#220615 13:09:49 server id 1842087586 end_log_pos 2907315 CRC32 0x8eae71f8 Write_rows: table id 5 flags: STMT_END_F

INSERT INTO testdb.t1

"testdb.sql" 4358L, 65328C

Child module polardbx-rpc does not exist

Error while building:

mvn -Dmaven.test.skip=true clean package

[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Child module /home/polardb/galaxysql/polardbx-rpc of /home/polardb/galaxysql/pom.xml does not exist @
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.alibaba.polardbx:polardbx:5.4.12-SNAPSHOT (/home/polardb/galaxysql/pom.xml) has 1 error
[ERROR] Child module /home/polardb/galaxysql/polardbx-rpc of /home/polardb/galaxysql/pom.xml does not exist
[ERROR]

【PXC-9001】CN启动失败, 报错: “No found any leader for metadb storage”

操作路径:
源码编译DN启动后
1 初始化 执行能够正常完成 bin/startup.sh -I -P asdf1234ghjk5678 -r "admin" -d 127.0.0.1:4886:32886 -u polardbx_root -S "123456"
2 把 metaDbPasswd=BVUB3NoOBdCXPv+X2Wa3es6Ng1tzChSd9Vzdm2RVaBo= 放到 conf/server.properties
3 启动 命令没有报错 bin/startup.sh -P asdf1234ghjk5678
4 连接数据库报错了,8527端口没有监听 mysql -h127.0.0.1 -P8527 -upolardbx_root -p123456
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)

配置如下:
image

报错日志:
image

startup.sh -I error "initialize gms failed ..." not written to logfile

运行 startup.sh -I 初始化GMS时,如果出现错误,没有生成日志文件tddl.log

polardbx-server/src/main/java/com/alibaba/polardbx/server/TddlLauncher.java
67 try {
68 initUserAccount(config);
69 initGms(config);
70 initPolarxRootUser(config);
71 System.err.println("Initialize polardbx success");
72 System.exit(0);
73 } catch (SQLException e) {
74 logger.error("initialize gms failed due to: " + e);
75 System.exit(1);
76 }
根据conf/logbak.xml中的配置,此logger会走到asyncROOT appender,由于程序立即退出,日志会来不及写入日志文件(tddl.log)
有两种改法都可以:1)简单的在exit之前增加 e.printStackTrace(); 2)在exit之前Thread.sleep(3000) (我自己的环境sleep 1秒就可以)

How to debug java.

When I try to use pxd command start PolarDB-X sample cluster in my host there are several docker containers start normally ,and it works fine, after that my workmate ask me a question : how can I debug PolarDB-X container java processes ? or expose docker port in already running PolarDB-X containers.

I assume thie containers start by docker-compose , but I cant find out this file .

So pls help to resolve this problem. Thx

安装步骤疑问

源码安装参考文档中

启动PolarDB-X DN
此步骤启动一个mysql进程,作为metadb和dn
参考附录中的mysql配置文件,可进行相应修改,默认使用 4886 作为 mysql端口,32886 作为私有协议端口
默认使用 /u01/my3306 作为mysql数据目录,可以修改成其他目录
注意:启动 DN 需要使用非 root 账号完成

启动mysql:

mkdir -p /u01/my3306/{data,log,run,tmp,mysql}
/u01/mysql/bin/mysqld --defaults-file=my.cnf --initialize-insecure
/u01/mysql/bin/mysqld --defaults-file=my.cnf

这里的mysql是需要单独装一个mysql server端?还是客户端?还是需要软链接到对应目录下?

编译GalaxyEngine时报错

系统为Debian 10
g++ (Debian 7.4.0-6) 7.4.0
gcc (Debian 7.4.0-6) 7.4.0

报错信息为:
In file included from /root/ApsaraDB/galaxyengine/sql/sys_vars.cc:44:0:
/root/ApsaraDB/galaxyengine/sql/sys_vars.cc:6785:66: error: ‘FALSE’ was not declared in this scope
SESSION_ONLY(sequence_read_skip_cache), NO_CMD_LINE, DEFAULT(FALSE),
^
/root/ApsaraDB/galaxyengine/sql/sys_vars.h:102:20: note: in definition of macro ‘DEFAULT’
#define DEFAULT(X) X
^
/root/ApsaraDB/galaxyengine/sql/sys_vars.cc:6785:66: note: suggested alternative: ‘FILE’
SESSION_ONLY(sequence_read_skip_cache), NO_CMD_LINE, DEFAULT(FALSE),
^
/root/ApsaraDB/galaxyengine/sql/sys_vars.h:102:20: note: in definition of macro ‘DEFAULT’
#define DEFAULT(X) X
^
/root/ApsaraDB/galaxyengine/sql/sys_vars_ext.cc:263:48: error: ‘FALSE’ was not declared in this scope
DEFAULT(FALSE), NO_MUTEX_GUARD,
^
/root/ApsaraDB/galaxyengine/sql/sys_vars.h:102:20: note: in definition of macro ‘DEFAULT’
#define DEFAULT(X) X
^
/root/ApsaraDB/galaxyengine/sql/sys_vars_ext.cc:263:48: note: suggested alternative: ‘FILE’
DEFAULT(FALSE), NO_MUTEX_GUARD,
^
/root/ApsaraDB/galaxyengine/sql/sys_vars.h:102:20: note: in definition of macro ‘DEFAULT’
#define DEFAULT(X) X
^
make[2]: *** [sql/CMakeFiles/sql_main.dir/build.make:3055: sql/CMakeFiles/sql_main.dir/sys_vars.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:11487: sql/CMakeFiles/sql_main.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

2022 Alibaba Summer of Code

Welcome to the open source world! If you haven't planned how to spend this summer, come to the Alibaba Summer of Code and code with us! 💻
Alibaba Summer of Code is a global program focused on engaging students directly in open source software development. Under the guidance of the mentor in the Alibaba open source project, students can experience software development in the real world. Alibaba Summer of code will begin from May 30th to September 1st. Students can use the summertime to participate in the open source project and work with the core members of the project.

What you can get?

On this exclusive developer journey, students will have the opportunity to:
● Participate in the top projects of the International Open Source Foundation;
● Get a scholarship from Alibaba;
● Obtain an open source contributor certificate;
● Get a fast pass of Alibaba Internship
● Get your code adopted and used by the open source project!

Our Mentor

Sun Mengshi,ASoC Mentor, PolarDB-X Committer.
Wu Di,@vettalwu,ASoC Mentor, PolarDB-X Committer.
He kewen,@HBKO ,ASoC Mentor, PolarDB-for-PostgreSQL Committer.
Zhang Jingtang,@mrdrivingduck ,ASoC Mentor, PolarDB-for-PostgreSQL Committer.

Timeline

image

Apply Now!

  1. Browse open idea list here:
    [ASoC]PolarDB-X Operator 混沌测试实践
    [ASoC]PolarDB-X支持DBLink
    [ASoC]PolarDB HTAP支持COPY导入数据的分布式加速
    [ASoC] PolarDB HTAP 支持并行加速创建物化视图

  2. Upload your CV and project proposal via ASOC 2022 official website
    https://opensource.alibaba.com/asoc2022
    Contact the Organizer
    If you have any questions, visit the event website:https://opensource.alibaba.com/asoc2022
    Email address:
    Email address: [email protected]

PolarDB-X 开源交流钉钉群:

image

PolarDB-PG 开源交流钉钉群:
image

module polardbx-rpc is missed

[ERROR] Child module /Users/hhao/workspace/galaxysql/polardbx-rpc of /Users/hhao/workspace/galaxysql/pom.xml does not exist @

why can you archive High concurrency

Hi, i am reading your project and i am interesting it, but i have a question, why can you archive High concurrency in your app, can you tell me how can you do it, the pros and cons when using it, thank u so much

Error: Lock wait timeout exceeded; try restarting transaction.

The error message is as follows:

ERR-CODE: [TDDL-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'SNOWBERG_PRE_000004_GROUP' ATOM 'dskey_snowberg_pre_000004_group#pxc-xdb-s-pxchzr468jpnxhjv48be8#11.61.195.2-3315#snowberg_pre_000004': Lock wait timeout exceeded; try restarting transaction.

Can the main branch be complied correctly?

mvn clean package
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Child module /Users/x/project/galaxysql/polardbx-rpc/pom.xml of /Users/x/project/galaxysql/pom.xml does not exist @ 
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project com.alibaba.polardbx:polardbx:5.4.12-SNAPSHOT (/Users/x/project/galaxysql/pom.xml) has 1 error
[ERROR]     Child module /Users/x/project/galaxysql/polardbx-rpc/pom.xml of /Users/x/project/galaxysql/pom.xml does not exist
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException

[PXC-10001][ERR_X_PROTOCOL_CLIENT] XClient of X-NIO-Client to [email protected]:32886 auth timeout

ERR-CODE: [PXC-10001][ERR_X_PROTOCOL_CLIENT] XClient of X-NIO-Client to [email protected]:32886 auth timeout. 9987410021ns
at com.alibaba.polardbx.rpc.client.XClient.initClient(XClient.java:668)
at com.alibaba.polardbx.rpc.pool.XClientPool.getConnection(XClientPool.java:422)
at com.alibaba.polardbx.rpc.pool.XClientPool.getConnection(XClientPool.java:276)
at com.alibaba.polardbx.rpc.pool.XConnectionManager.getConnection(XConnectionManager.java:469)
at com.alibaba.polardbx.rpc.compatible.XDataSource.getConnection(XDataSource.java:193)
at com.alibaba.polardbx.gms.metadb.MetaDbDataSource.initTsoServicesX(MetaDbDataSource.java:126)
at com.alibaba.polardbx.gms.metadb.MetaDbDataSource.initXDataSourceByJdbcProps(MetaDbDataSource.java:171)
at com.alibaba.polardbx.gms.metadb.MetaDbDataSource.initMetaDbDataSource(MetaDbDataSource.java:182)
at com.alibaba.polardbx.gms.metadb.MetaDbDataSource.doInit(MetaDbDataSource.java:121)
at com.alibaba.polardbx.common.model.lifecycle.AbstractLifecycle.init(AbstractLifecycle.java:43)
at com.alibaba.polardbx.gms.metadb.MetaDbDataSource.getInstance(MetaDbDataSource.java:463)
at com.alibaba.polardbx.gms.metadb.MetaDbDataSource.initMetaDbDataSource(MetaDbDataSource.java:489)
at com.alibaba.polardbx.config.loader.ServerLoader.initPolarDbXComponents(ServerLoader.java:207)
at com.alibaba.polardbx.config.loader.ServerLoader.load(ServerLoader.java:181)
at com.alibaba.polardbx.config.loader.ServerLoader.doInit(ServerLoader.java:91)
at com.alibaba.polardbx.common.model.lifecycle.AbstractLifecycle.init(AbstractLifecycle.java:43)
at com.alibaba.polardbx.CobarConfig.initCobarConfig(CobarConfig.java:68)
at com.alibaba.polardbx.CobarConfig.(CobarConfig.java:61)
at com.alibaba.polardbx.CobarServer.(CobarServer.java:141)
at com.alibaba.polardbx.CobarServer.(CobarServer.java:95)
at com.alibaba.polardbx.server.TddlLauncher.main(TddlLauncher.java:82)
tddl.tar.gz
操作系统信息.txt

[bug] Compiling DataNode(galaxyengine) needs gcc 9 or later

phenonmenon

When I followed the source installation guide to compile galaxyengine, I found gcc cannot support -fuse-ld=lld option, the error messages of CMakeFiles/CMakeError.log looks like:

Linking C executable cmTC_6284a
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_6284a.dir/link.txt --verbose=1
/usr/bin/gcc  -fno-omit-frame-pointer  -DC_LD_LLD_RESULT    CMakeFiles/cmTC_6284a.dir/src.c.o  -o cmTC_6284a -fuse-ld=lld
gcc: error: unrecognized command line option '-fuse-ld=lld'; did you mean '-fuse-ld=bfd'?
MakeFiles/cmTC_6284a.dir/build.make:97: recipe for target 'cmTC_6284a' failed
gmake[1]: *** [cmTC_6284a] Error 1

analysis

The help of gcc(/usr/bin/gcc -v --help 2>&1 | grep -E "fuse-ld") shows that is -fuse-ld=lld is not a avaiable option. Then, I checked the GNU manuals, I found which version of gcc you recommended in the installation guide DO NOT support -fuse-ld=lld in your cmake receipe in total.

According to the release of gcc, it is obvious that the neccessary gcc version is 9.1 or later .

suggestion

Update the source installation guide GCC 7 with GCC 9.

environment

galaxyengine main/4cc03124f8530c03c948d2b9d91624ca196e8f22
openSUSE Leap 42.3
gcc 7.4.0

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.