Code Monkey home page Code Monkey logo

tendbcluster-tdbctl's People

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tendbcluster-tdbctl's Issues

routing sql is null, flush do nothing

MySQL [mysql]> select * from mysql.servers;
+-------------+-----------+----+----------+----------+-------+--------+---------+-------+
| Server_name | Host | Db | Username | Password | Port | Socket | Wrapper | Owner |
+-------------+-----------+----+----------+----------+-------+--------+---------+-------+
| SPIDER0 | 127.0.0.1 | | mysql | mysql | 25000 | | SPIDER | |
| SPT0 | 127.0.0.1 | | mysql | mysql | 20000 | | mysql | |
| SPT1 | 127.0.0.1 | | mysql | mysql | 20001 | | mysql | |
| TDBCTL0 | 127.0.0.1 | | mysql | mysql | 26000 | | TDBCTL | |
+-------------+-----------+----+----------+----------+-------+--------+---------+-------+
4 rows in set (0.000 sec)

MySQL [mysql]> tdbctl flush routing;
Query OK, 0 rows affected, 1 warning (0.001 sec)

MySQL [mysql]> show warnings;
+---------+-------+---------------------------------------+
| Level | Code | Message |
+---------+-------+---------------------------------------+
| Warning | 12028 | routing sql is null, flush do nothing |
+---------+-------+---------------------------------------+
1 row in set (0.000 sec)

Customize sharding parameters in TenDBCluster

English
中文

New feature

  1. Add shard_count, shard_func, shard_type support for TDBCTL. Users can customize shard count, functions and types on TSpider.
    Exmaple:
-- first, configure tdbctl routing
-- on tspider
set ddl_execute_by_ctl = on;
CREATE TABLE t1 (
    id INT PRIMARY KEY,
    vc VARCHAR(20)
)COMMENT 'shard_count "1", shard_func "crc32", shard_type "list"'

shard_count can be set with value 0, 1 or the number of backends. The default value is 0, meaning set shard_count as the number of backends.
WARNING, on current version, use customized shard_count = "1" could trigger bugs on DDL like ALTER TABLE and DROP TABLE.
shard_func can be set with crc32, crc32_ci, none, which means PARTITION BY LIST(crc32(key)), (crc32_ci(key)) and (key) respectively. The default value is crc32. Note: crc32_ci means crc32 case ignore.
shard_type can be choosen from list and range. The default value is list, which specifies partition type as list.

新功能

  1. 增加了自定义shard_count, shard_func, shard_type支持,用户可以在TSpider中指定这些参数。
    例子:
-- first, configure tdbctl routing
-- on tspider
set ddl_execute_by_ctl = on;
CREATE TABLE t1 (
    id INT PRIMARY KEY,
    vc VARCHAR(20)
)COMMENT 'shard_count "1", shard_func "crc32", shard_type "list"'

shard_count 的值可以为0, 1或者当前所有后端总数. 默认值是0,表示使用当前所有后端。
WARNING, 在现在的版本中,自定义shard_count = "1"会在ALTER TABLEDROP TABLE类的DDL上触发bug.
shard_func 的值可以为crc32, crc32_ci, none, 分别表示PARTITION BY LIST(crc32(key)), (crc32_ci(key))(key). 默认值是crc32. 注意:crc32_ci表示忽略大小写的crc32
shard_type 可以选择list或者range,默认值是list, 制定了分区类别是list

Message is truncated when drop non-exists table

image
(I have four backend TenDB nodes)

When I drop a non-exists table, the Tdbctl node distribute command to Tspider and TenDB nodes. It's reasonable to show the all failed message, but it's truncated in the console.

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.