8000 [Enhancement] Change time-related column type to datetime in FeTabletSchedules system table by wyb · Pull Request #59813 · StarRocks/starrocks · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[Enhancement] Change time-related column type to datetime in FeTabletSchedules system table #59813

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

Merged
merged 5 commits into from
Jun 13, 2025

Conversation

wyb
Copy link
Contributor
@wyb wyb commented Jun 11, 2025

Why I'm doing:

CREATE_TIME, SCHEDULE_TIME, FINISH_TIME column types are double.

mysql> select * from fe_tablet_schedules;
+----------+--------------+-----------+--------+----------+-----------+----------------+----------------+----------------+----------------+-----------+------------+-------------+----------------+-------------------------------------+
| TABLE_ID | PARTITION_ID | TABLET_ID | TYPE   | PRIORITY | STATE     | TABLET_STATUS  | CREATE_TIME    | SCHEDULE_TIME  | FINISH_TIME    | CLONE_SRC | CLONE_DEST | CLONE_BYTES | CLONE_DURATION | MSG                                 |
+----------+--------------+-----------+--------+----------+-----------+----------------+----------------+----------------+----------------+-----------+------------+-------------+----------------+-------------------------------------+
|    52033 |        52032 |     52036 | REPAIR | HIGH     | CANCELLED | DISK_MIGRATION | 1749609761.376 | 1749609762.384 | 1749609762.384 |        -1 |         -1 |           0 |              0 | there is no replica need to migrate |

What I'm doing:

change double to datetime.

mysql> select * from fe_tablet_schedules;
+----------+--------------+-----------+--------+----------+-----------+----------------+---------------------+---------------------+---------------------+-----------+------------+-------------+----------------+-------------------------------------+
| TABLE_ID | PARTITION_ID | TABLET_ID | TYPE   | PRIORITY | STATE     | TABLET_STATUS  |    CREATE_TIME      |  SCHEDULE_TIME      |    FINISH_TIME      | CLONE_SRC | CLONE_DEST | CLONE_BYTES | CLONE_DURATION | MSG                                 |
+----------+--------------+-----------+--------+----------+-----------+----------------+---------------------+---------------------+---------------------+-----------+------------+-------------+----------------+-------------------------------------+
|    52033 |        52032 |     52036 | REPAIR | HIGH     | CANCELLED | DISK_MIGRATION | 2025-06-11 10:42:41 | 2025-06-11 10:42:42 | 2025-06-11 10:42:42 |        -1 |         -1 |           0 |              0 | there is no replica need to migrate |

Fixes #issue

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 3.5
    • 3.4
    • 3.3

@wyb wyb requested review from a team as code owners June 11, 2025 09:37
@mergify mergify bot assigned wyb Jun 11, 2025
@wyb wyb force-pushed the fe_tablet_schedules_column_type branch from 686abd1 to b59c86c Compare June 11, 2025 09:46
Copy link
Contributor
@alvin-celerdata alvin-celerdata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will it cause issue during rolling upgrade? The there are new BE and old version FE, what will happen to the cluster?

@wyb
Copy link
Contributor Author
wyb commented Jun 12, 2025

Will it cause issue during rolling upgrade? The there are new BE and old version FE, what will happen to the cluster?

Yes, the query will fail with error schema not match during upgrade.
I haven't thought of a good solution yet.

@alvin-celerdata
Copy link
Contributor

Will it cause issue during rolling upgrade? The there are new BE and old version FE, what will happen to the cluster?

Yes, the query will fail with error schema not match during upgrade. I haven't thought of a good solution yet.

Did you give it a try?
If it won't crash the backend, it is acceptable.

…Schedules system table

Signed-off-by: wyb <wybb86@gmail.com>
@wyb wyb force-pushed the fe_tablet_schedules_column_type branch 3 times, most recently from 8d532b3 to c6bf7f4 Compare June 12, 2025 07:51
@wyb
Copy link
Contributor Author
wyb commented Jun 12, 2025

Will it cause issue during rolling upgrade? The there are new BE and old version FE, what will happen to the cluster?

Yes, the query will fail with error schema not match during upgrade. I haven't thought of a good solution yet.

Did you give it a try? If it won't crash the backend, it is acceptable.

I tested this yesterday, but i find a solution now, please review.

@wyb wyb force-pushed the fe_tablet_schedules_column_type branch 2 times, most recently from 9119be9 to 707b1d6 Compare June 12, 2025 08:25
Signed-off-by: wyb <wybb86@gmail.com>
@wyb wyb force-pushed the fe_tablet_schedules_column_type branch from 707b1d6 to ea86695 Compare June 12, 2025 08:59
wyb and others added 3 commits June 13, 2025 14:02
Co-authored-by: alvin <115669851+alvin-celerdata@users.noreply.github.com>
Signed-off-by: wyb <wybb86@gmail.com>
Co-authored-by: alvin <115669851+alvin-celerdata@users.noreply.github.com>
Signed-off-by: wyb <wybb86@gmail.com>
Signed-off-by: wyb <wybb86@gmail.com>
Copy link

Copy link

[Java-Extensions Incremental Coverage Report]

pass : 0 / 0 (0%)

Copy link

[FE Incremental Coverage Report]

pass : 3 / 3 (100.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/catalog/system/information/FeTabletSchedulesSystemTable.java 3 3 100.00% []

Copy link

[BE Incremental Coverage Report]

fail : 21 / 29 (72.41%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 be/src/exec/pipeline/scan/schema_chunk_source.cpp 1 7 14.29% [61, 62, 63, 64, 65, 66]
🔵 be/src/exec/schema_scanner/schema_fe_tablet_schedules_scanner.cpp 20 22 90.91% [77, 78]

@alvin-celerdata alvin-celerdata merged commit 84ecab9 into StarRocks:main Jun 13, 2025
78 of 80 checks passed
AntiTopQuark pushed a commit to AntiTopQuark/starrocks that referenced this pull request Jun 19, 2025
…Schedules system table (StarRocks#59813)

## Why I'm doing:

`CREATE_TIME, SCHEDULE_TIME, FINISH_TIME` column types are double.

```
mysql> select * from fe_tablet_schedules;
+----------+--------------+-----------+--------+----------+-----------+----------------+----------------+----------------+----------------+-----------+------------+-------------+----------------+-------------------------------------+
| TABLE_ID | PARTITION_ID | TABLET_ID | TYPE   | PRIORITY | STATE     | TABLET_STATUS  | CREATE_TIME    | SCHEDULE_TIME  | FINISH_TIME    | CLONE_SRC | CLONE_DEST | CLONE_BYTES | CLONE_DURATION | MSG                                 |
+----------+--------------+-----------+--------+----------+-----------+----------------+----------------+----------------+----------------+-----------+------------+-------------+----------------+-------------------------------------+
|    52033 |        52032 |     52036 | REPAIR | HIGH     | CANCELLED | DISK_MIGRATION | 1749609761.376 | 1749609762.384 | 1749609762.384 |        -1 |         -1 |           0 |              0 | there is no replica need to migrate |
```

## What I'm doing:

change double to datetime.

```
mysql> select * from fe_tablet_schedules;
+----------+--------------+-----------+--------+----------+-----------+----------------+---------------------+---------------------+---------------------+-----------+------------+-------------+----------------+-------------------------------------+
| TABLE_ID | PARTITION_ID | TABLET_ID | TYPE   | PRIORITY | STATE     | TABLET_STATUS  |    CREATE_TIME      |  SCHEDULE_TIME      |    FINISH_TIME      | CLONE_SRC | CLONE_DEST | CLONE_BYTES | CLONE_DURATION | MSG                                 |
+----------+--------------+-----------+--------+----------+-----------+----------------+---------------------+---------------------+---------------------+-----------+------------+-------------+----------------+-------------------------------------+
|    52033 |        52032 |     52036 | REPAIR | HIGH     | CANCELLED | DISK_MIGRATION | 2025-06-11 10:42:41 | 2025-06-11 10:42:42 | 2025-06-11 10:42:42 |        -1 |         -1 |           0 |              0 | there is no replica need to migrate |
```

Signed-off-by: wyb <wybb86@gmail.com>
Co-authored-by: alvin <115669851+alvin-celerdata@users.noreply.github.com>
Signed-off-by: AntiTopQuark <AntiTopQuark1350@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0