starrocks icon indicating copy to clipboard operation
starrocks copied to clipboard

[BugFix] Fix InfoSchemaDb id increasing continuously bug

Open gengjun-git opened this issue 3 years ago • 8 comments
trafficstars

What type of PR is this:

  • [x] bug
  • [ ] feature
  • [ ] enhancement
  • [ ] refactor
  • [ ] others

Which issues of this PR fixes :

Fixes #9810

Problem Summary(Required) :

The information_schema db is not persisted, it is generated in loadCluster when loading image. Its id will increase once the loadCluster is called. If the cluster runs for a long time(3 months for example), its id may be bigger than 10000 ( which is the upper limit of system id), because the loadCluster will be called every time a checkpoint is done. The reason why the information_schema db's id will be increased maybe there will be many clusters in the system and every cluster will have its own information_schema db. But the cluster has be deprecated in our system, so we just give a fixed id number for every system db or table.

Checklist:

  • [ ] I have added test cases for my bug fix or my new feature
  • [ ] I have added user document for my new feature or new function

gengjun-git avatar Aug 10 '22 03:08 gengjun-git

run starrocks_admit_test

wanpengfei-git avatar Aug 10 '22 13:08 wanpengfei-git

run starrocks_fe_unittest

gengjun-git avatar Aug 11 '22 02:08 gengjun-git

run starrocks_fe_unittest

gengjun-git avatar Aug 11 '22 02:08 gengjun-git

run starrocks_admit_test

wanpengfei-git avatar Aug 11 '22 06:08 wanpengfei-git

run starrocks_admit_test

wanpengfei-git avatar Aug 12 '22 03:08 wanpengfei-git

run starrocks_admit_test

wanpengfei-git avatar Aug 12 '22 06:08 wanpengfei-git

[FE PR Coverage Check]

:disappointed: fail : 1 / 2 (50.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
:large_blue_circle: com/starrocks/common/SystemId.java 0 1 00.00% [7]
:large_blue_circle: com/starrocks/catalog/InfoSchemaDb.java 1 1 100.00% []

wanpengfei-git avatar Aug 12 '22 07:08 wanpengfei-git

@mergify backport branch-2.4

gengjun-git avatar Sep 21 '22 11:09 gengjun-git

backport branch-2.4

✅ Backports have been created

mergify[bot] avatar Sep 21 '22 11:09 mergify[bot]