Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Optimize table re-partition & re-bucket] after alter table optimize then downgrade to 3.1 failed #45559

Closed
huoyue-git opened this issue May 13, 2024 · 0 comments · Fixed by #45558
Assignees
Labels
type/bug Something isn't working

Comments

@huoyue-git
Copy link

Steps to reproduce the behavior (Required)

set history_job_keep_max_second = 60

admin show frontend config like "history_job_keep_max_second";
+-----------------------------+------------+-------+------+-----------+---------+
| Key                         | AliasNames | Value | Type | IsMutable | Comment |
+-----------------------------+------------+-------+------+-----------+---------+
| history_job_keep_max_second | []         | 60    | int  | true      |         |
+-----------------------------+------------+-------+------+-----------+---------+
1 row in set (0.01 sec)
CREATE TABLE `set_bucket_num_tbl` ( `k1`  date, `k2`  datetime, `k3`  char(20), `k4`  varchar(20), `k5`  boolean, `k6`  tinyint, `k7`  smallint, `k8`  int, `k9`  bigint, `k10` largeint, `k11` float, `k12` double, `k13` decimal(27,9) ) DUPLICATE KEY(`k1`, `k2`, `k3`, `k4`, `k5`) COMMENT "OLAP" DISTRIBUTED BY HASH(`k1`) BUCKETS 3 PROPERTIES ( "replication_num" = "3", "storage_format" = "v2", "light_schema_change" = "false" );
CREATE TABLE `set_hash_to_random_tbl` ( `k1`  date, `k2`  datetime, `k3`  char(20), `k4`  varchar(20), `k5`  boolean, `k6`  tinyint, `k7`  smallint, `k8`  int, `k9`  bigint, `k10` largeint, `k11` float, `k12` double, `k13` decimal(27,9) ) DUPLICATE KEY(`k1`, `k2`, `k3`, `k4`, `k5`) COMMENT "OLAP" DISTRIBUTED BY HASH(`k1`) BUCKETS 3 PROPERTIES ( "replication_num" = "3", "storage_format" = "v2", "light_schema_change" = "false" );
alter table set_bucket_num_tbl DISTRIBUTED BY HASH(`k1`) buckets 2;
alter table set_hash_to_random_tbl distributed by random;

SHOW ALTER TABLE optimize;
mysql> SHOW ALTER TABLE optimize;
+-------+------------------------+---------------------+---------------------+-----------------------------------------+---------------+----------+------+----------+---------+
| JobId | TableName              | CreateTime          | FinishTime          | Operation                               | TransactionId | State    | Msg  | Progress | Timeout |
+-------+------------------------+---------------------+---------------------+-----------------------------------------+---------------+----------+------+----------+---------+
| 11002 | set_bucket_num_tbl     | 2024-05-13 19:59:55 | 2024-05-13 20:00:11 | ALTER DISTRIBUTED BY HASH(k1) BUCKETS 2 | 1003          | FINISHED |      | 100      | 86400   |
| 11014 | set_hash_to_random_tbl | 2024-05-13 20:00:02 | NULL                | ALTER DISTRIBUTED BY RANDOM             | 1005          | RUNNING  |      | 0        | 86400   |
+-------+------------------------+---------------------+---------------------+-----------------------------------------+---------------+----------+------+----------+---------+
2 rows in set (0.00 sec)

wait until result is null
mysql> SHOW ALTER TABLE optimize;
Empty set (0.01 sec)

mysql> alter system create image;
Query OK, 0 rows affected (0.01 sec)


grep -iar "checkpoint finished save image"  fe.log

image

downgrade to 3.1 failed

Expected behavior (Required)

downgrade successfully

Real behavior (Required)

downgrade failed

StarRocks version (Required)

  • You can get the StarRocks version by executing SQL select current_version()
    mysql> select current_version();
    +--------------------+
    | current_version() |
    +--------------------+
    | branch-3.2-1089e37 |
    +--------------------+
    1 row in set (0.05 sec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants