zettadb / kunlun-storage-081809

Kunlun-storage is the storage component for Kunlun distributed DBMS. It's developed based on percona-mysql-8.0.x and contains exclusive features used by Kunlun distributed DBMS, performance enhancements and XA transaction crash safety enhancements without which MySQL would not be able to execute XA transactions reliably.
Other
31 stars 6 forks source link

Table distribution imbalance #4

Open jd-zhang opened 3 years ago

jd-zhang commented 3 years ago

Issue migrated from trac ticket # 11

component: kunlun-storage | priority: major

2021-03-15 11:35:42: @jd-zhang created the issue


The cluster: One meta shard and two data shards.

  • Create 15 tables
  • first shard has 9 tables
  • second shard has 6 tables
  • create 255 tables, and all these tables fall into the same data shard.

The command to create 255 table is: i=0 while test $i -lt 255; do psql -h localhost -p 5401 -Ukunlun postgres -c "create table batch$i(id integer primary key, f1 int)"; let i++; done

jd-zhang commented 3 years ago

2021-03-30 16:24:52: @jd-zhang commented


The case can be reproducey by creating many tables quicky.

There are two issues here:

  • When there are 2+ shards, these quickly created tables are put into the same shard
  • Even adding new shards, the created tables are still put into the same old shard.
jd-zhang commented 3 years ago

2021-05-31 16:26:11: @david-zhao

jd-zhang commented 3 years ago

2021-09-15 10:43:29: @jd-zhang changed owner from kunlun to david